svn commit: samba r8159 - in trunk/source/locking: .

vlendec at samba.org vlendec at samba.org
Tue Jul 5 07:35:42 GMT 2005


Author: vlendec
Date: 2005-07-05 07:35:41 +0000 (Tue, 05 Jul 2005)
New Revision: 8159

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

Log:
Keep valgrind (&jra) happy :-)
Modified:
   trunk/source/locking/locking.c


Changeset:
Modified: trunk/source/locking/locking.c
===================================================================
--- trunk/source/locking/locking.c	2005-07-05 07:10:52 UTC (rev 8158)
+++ trunk/source/locking/locking.c	2005-07-05 07:35:41 UTC (rev 8159)
@@ -719,10 +719,11 @@
 		pstrcat(fname, fsp->fsp_name);
 
 		size = sizeof(*data) + sizeof(share_mode_entry) + strlen(fname) + 1;
-		p = SMB_CALLOC_ARRAY(char, size);
+		p = (char *)SMB_MALLOC(size);
 		if (!p)
 			return False;
 		data = (struct locking_data *)p;
+		ZERO_STRUCT(data->u.dummy); /* Keep valgrind happy */
 		data->u.num_share_mode_entries = 1;
 	
 		DEBUG(10,("set_share_mode: creating entry for file %s. num_share_modes = 1\n",
@@ -1202,10 +1203,11 @@
 		/* we'll need to create a new record */
 
 		size = sizeof(*data) + sizeof(deferred_open_entry) + strlen(fname) + 1;
-		p = SMB_CALLOC_ARRAY(char, size);
+		p = (char *)SMB_MALLOC(size);
 		if (!p)
 			return False;
 		data = (struct deferred_open_data *)p;
+		ZERO_STRUCT(data->u.dummy); /* Keep valgrind happy */
 		data->u.num_deferred_open_entries = 1;
 	
 		DEBUG(10,("add_deferred_open: creating entry for file %s. num_deferred_open_entries = 1\n",



More information about the samba-cvs mailing list