diff options
Diffstat (limited to 'source3')
-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; } |