svn commit: samba r13887 - in branches/SAMBA_3_0/source/nmbd: .

jra at samba.org jra at samba.org
Mon Mar 6 19:34:26 GMT 2006


Author: jra
Date: 2006-03-06 19:34:25 +0000 (Mon, 06 Mar 2006)
New Revision: 13887

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13887

Log:
Fix coverity bug CID #94. mem leak on error codepath.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/nmbd/nmbd_packets.c


Changeset:
Modified: branches/SAMBA_3_0/source/nmbd/nmbd_packets.c
===================================================================
--- branches/SAMBA_3_0/source/nmbd/nmbd_packets.c	2006-03-06 19:31:16 UTC (rev 13886)
+++ branches/SAMBA_3_0/source/nmbd/nmbd_packets.c	2006-03-06 19:34:25 UTC (rev 13887)
@@ -1670,11 +1670,13 @@
 	if((count*2) + 2 > FD_SETSIZE) {
 		DEBUG(0,("create_listen_fdset: Too many file descriptors needed (%d). We can \
 only use %d.\n", (count*2) + 2, FD_SETSIZE));
+		SAFE_FREE(pset);
 		return True;
 	}
 
 	if((sock_array = SMB_MALLOC_ARRAY(int, (count*2) + 2)) == NULL) {
 		DEBUG(0,("create_listen_fdset: malloc fail for socket array.\n"));
+		SAFE_FREE(pset);
 		return True;
 	}
 



More information about the samba-cvs mailing list