diff options
author | Volker Lendecke <vl@samba.org> | 2008-01-24 16:12:42 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-01-24 16:31:55 +0100 |
commit | 1eb484d4b471c2c040df42a6566cc0805efc071a (patch) | |
tree | 74c36f9e56eeb4d78e38db67ae1a2592b05fd04c /source3/nmbd | |
parent | ba6c78c355a596f190b16a53052994f31d1d58ca (diff) | |
download | samba-1eb484d4b471c2c040df42a6566cc0805efc071a.tar.gz samba-1eb484d4b471c2c040df42a6566cc0805efc071a.tar.bz2 samba-1eb484d4b471c2c040df42a6566cc0805efc071a.zip |
Fix Coverity ID 454
(This used to be commit 902d1d6709e47fbc8b538f28cb4364b006c431f8)
Diffstat (limited to 'source3/nmbd')
-rw-r--r-- | source3/nmbd/nmbd.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c index 344831ddca..378b6f3dbe 100644 --- a/source3/nmbd/nmbd.c +++ b/source3/nmbd/nmbd.c @@ -676,11 +676,18 @@ static bool open_sockets(bool isdaemon, int port) ClientNMB = 0; } + if (ClientNMB == -1) { + return false; + } + ClientDGRAM = open_socket_in(SOCK_DGRAM, DGRAM_PORT, 3, &ss, true); - if (ClientNMB == -1) { + if (ClientDGRAM == -1) { + if (ClientNMB != 0) { + close(ClientNMB); + } return false; } |