summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2011-08-04 17:28:05 +0200
committerKarolin Seeger <kseeger@samba.org>2011-10-24 19:16:10 +0200
commit8dbbb542da415ed1d26e5a567482b0a6b7b32cb8 (patch)
tree18cb724a0e1b0d3af3e781397b91bc11c7e32eb2
parent8ea73cedf27010900b70553ca100799e64963595 (diff)
downloadsamba-8dbbb542da415ed1d26e5a567482b0a6b7b32cb8.tar.gz
samba-8dbbb542da415ed1d26e5a567482b0a6b7b32cb8.tar.xz
samba-8dbbb542da415ed1d26e5a567482b0a6b7b32cb8.zip
s3-nmbd: fix memleak in create_listen_fdset().
Guenther The last 2 patches address bug #8491 (fix some coverity issues). (cherry picked from commit 702443500268ceb4dd3e0d3a1a130bca465be266)
-rw-r--r--source3/nmbd/nmbd_packets.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/nmbd/nmbd_packets.c b/source3/nmbd/nmbd_packets.c
index e53eebb0067..51c9acc473f 100644
--- a/source3/nmbd/nmbd_packets.c
+++ b/source3/nmbd/nmbd_packets.c
@@ -1715,6 +1715,7 @@ only use %d.\n", count, FD_SETSIZE));
if (ClientNMB < 0 || ClientNMB >= FD_SETSIZE) {
errno = EBADF;
SAFE_FREE(pset);
+ SAFE_FREE(sock_array);
return True;
}
@@ -1752,6 +1753,7 @@ only use %d.\n", count, FD_SETSIZE));
if (ClientDGRAM < 0 || ClientDGRAM >= FD_SETSIZE) {
errno = EBADF;
SAFE_FREE(pset);
+ SAFE_FREE(sock_array);
return True;
}
FD_SET(ClientDGRAM,pset);