diff options
Diffstat (limited to 'net/socket.c')
-rw-r--r-- | net/socket.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/socket.c b/net/socket.c index aaf9be4..c9d70d3 100644 --- a/net/socket.c +++ b/net/socket.c @@ -427,12 +427,14 @@ static int net_socket_listen_init(VLANState *vlan, if (ret < 0) { perror("bind"); g_free(s); + closesocket(fd); return -1; } ret = listen(fd, 0); if (ret < 0) { perror("listen"); g_free(s); + closesocket(fd); return -1; } s->vlan = vlan; |