summaryrefslogtreecommitdiff
path: root/source3/nmbd
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-01-24 16:12:42 +0100
committerVolker Lendecke <vl@samba.org>2008-01-24 16:31:55 +0100
commit1eb484d4b471c2c040df42a6566cc0805efc071a (patch)
tree74c36f9e56eeb4d78e38db67ae1a2592b05fd04c /source3/nmbd
parentba6c78c355a596f190b16a53052994f31d1d58ca (diff)
downloadsamba-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.c9
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;
}