svn commit: samba r19078 - in branches/SAMBA_3_0/source/locking: .

vlendec at samba.org vlendec at samba.org
Wed Oct 4 20:51:18 GMT 2006


Author: vlendec
Date: 2006-10-04 20:51:17 +0000 (Wed, 04 Oct 2006)
New Revision: 19078

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

Log:
talloc_strdup can fail
Modified:
   branches/SAMBA_3_0/source/locking/locking.c


Changeset:
Modified: branches/SAMBA_3_0/source/locking/locking.c
===================================================================
--- branches/SAMBA_3_0/source/locking/locking.c	2006-10-04 20:43:56 UTC (rev 19077)
+++ branches/SAMBA_3_0/source/locking/locking.c	2006-10-04 20:51:17 UTC (rev 19078)
@@ -562,12 +562,18 @@
 					(lck->num_share_modes *
 					sizeof(struct share_mode_entry)) +
 					data->u.s.delete_token_size );
+	if (lck->servicepath == NULL) {
+		smb_panic("talloc_strdup failed\n");
+	}
 
 	lck->filename = talloc_strdup(lck, dbuf.dptr + sizeof(*data) +
 					(lck->num_share_modes *
 					sizeof(struct share_mode_entry)) +
 					data->u.s.delete_token_size +
 					strlen(lck->servicepath) + 1 );
+	if (lck->filename == NULL) {
+		smb_panic("talloc_strdup failed\n");
+	}
 
 	/*
 	 * Ensure that each entry has a real process attached.



More information about the samba-cvs mailing list