svn commit: samba r13885 - in trunk/source/nmbd: .

jra at samba.org jra at samba.org
Mon Mar 6 19:30:45 GMT 2006


Author: jra
Date: 2006-03-06 19:30:40 +0000 (Mon, 06 Mar 2006)
New Revision: 13885

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

Log:
Fix coverity CID #95. Resource leak on error path.
Jeremy.

Modified:
   trunk/source/nmbd/nmbd_packets.c


Changeset:
Modified: trunk/source/nmbd/nmbd_packets.c
===================================================================
--- trunk/source/nmbd/nmbd_packets.c	2006-03-06 19:30:34 UTC (rev 13884)
+++ trunk/source/nmbd/nmbd_packets.c	2006-03-06 19:30:40 UTC (rev 13885)
@@ -536,6 +536,8 @@
 
 	userdata = (struct userdata_struct *)SMB_MALLOC(sizeof(*userdata) + strlen(tag) + 1);
 	if (!userdata) {
+		p->locked = False;
+		free_packet(p);
 		DEBUG(0,("Failed to allocate userdata structure!\n"));
 		return;
 	}



More information about the samba-cvs mailing list