git.samba.org
/
gd
/
samba
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
21d126c
)
Fix Coverity ID 454
author
Volker Lendecke
<vl@samba.org>
Thu, 24 Jan 2008 15:12:42 +0000
(16:12 +0100)
committer
Volker Lendecke
<vl@samba.org>
Thu, 24 Jan 2008 15:31:55 +0000
(16:31 +0100)
source/nmbd/nmbd.c
patch
|
blob
|
history
diff --git
a/source/nmbd/nmbd.c
b/source/nmbd/nmbd.c
index 344831ddca77cd2ed37ae908da01d1ce6098e69e..378b6f3dbe078627bc1b7779f73b6e7e8be6432b 100644
(file)
--- a/
source/nmbd/nmbd.c
+++ b/
source/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;
}