diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-10-31 09:34:13 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-10-31 16:02:42 +0100 |
commit | 8386b2079937907fdcb6d080423a40ede5dfc9df (patch) | |
tree | 9430c9c3c6458cc6054c06c40fc6596c5802358a /source4 | |
parent | 8b375eef24e701a673a5d8af6639f96dc2657229 (diff) | |
download | samba-8386b2079937907fdcb6d080423a40ede5dfc9df.tar.gz samba-8386b2079937907fdcb6d080423a40ede5dfc9df.tar.bz2 samba-8386b2079937907fdcb6d080423a40ede5dfc9df.zip |
s4:lib/socket: don't pass -1 to close()
metze
Diffstat (limited to 'source4')
-rw-r--r-- | source4/lib/socket/socket_ip.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/lib/socket/socket_ip.c b/source4/lib/socket/socket_ip.c index 80f7d333f3..cab51beafb 100644 --- a/source4/lib/socket/socket_ip.c +++ b/source4/lib/socket/socket_ip.c @@ -58,7 +58,10 @@ static NTSTATUS ipv4_init(struct socket_context *sock) static void ip_close(struct socket_context *sock) { - close(sock->fd); + if (sock->fd != -1) { + close(sock->fd); + sock->fd = -1; + } } static NTSTATUS ip_connect_complete(struct socket_context *sock, uint32_t flags) |