svn commit: samba r8132 - in trunk/source/locking: .
vlendec at samba.org
vlendec at samba.org
Mon Jul 4 09:56:10 GMT 2005
Author: vlendec
Date: 2005-07-04 09:56:09 +0000 (Mon, 04 Jul 2005)
New Revision: 8132
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8132
Log:
Fix to valgrind uninitialized write errors. Jeremy, I hope we can affort to
zero out the data here.
Volker
Modified:
trunk/source/locking/locking.c
Changeset:
Modified: trunk/source/locking/locking.c
===================================================================
--- trunk/source/locking/locking.c 2005-07-04 09:11:25 UTC (rev 8131)
+++ trunk/source/locking/locking.c 2005-07-04 09:56:09 UTC (rev 8132)
@@ -719,7 +719,7 @@
pstrcat(fname, fsp->fsp_name);
size = sizeof(*data) + sizeof(share_mode_entry) + strlen(fname) + 1;
- p = (char *)SMB_MALLOC(size);
+ p = SMB_CALLOC_ARRAY(char, size);
if (!p)
return False;
data = (struct locking_data *)p;
@@ -1202,7 +1202,7 @@
/* we'll need to create a new record */
size = sizeof(*data) + sizeof(deferred_open_entry) + strlen(fname) + 1;
- p = (char *)SMB_MALLOC(size);
+ p = SMB_CALLOC_ARRAY(char, size);
if (!p)
return False;
data = (struct deferred_open_data *)p;
More information about the samba-cvs
mailing list