git.samba.org
/
nivanova
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e0ec9d2
)
In tdb_allocate(), we would create a new record by writing a local variable
author
Andrew Bartlett
<abartlet@samba.org>
Thu, 8 Jan 2004 05:37:23 +0000
(
05:37
+0000)
committer
Andrew Bartlett
<abartlet@samba.org>
Thu, 8 Jan 2004 05:37:23 +0000
(
05:37
+0000)
'newrec' into the tdb.
This was not initialised, so valgrind warned about it.
(Note: valgrind only makes sense on tdbs with 'mmap = no' in your smb.conf)
Andrew Bartlett
(This used to be commit
c9f9d6d3171d720b4ec0ba6af8c0c8ab178cd98b
)
source3/tdb/tdb.c
patch
|
blob
|
history
diff --git
a/source3/tdb/tdb.c
b/source3/tdb/tdb.c
index c98b0936ed07c09510f8d1a0925084b2da7c6ea6..ff7075038551497f4756a6695092aed43bbb0eea 100644
(file)
--- a/
source3/tdb/tdb.c
+++ b/
source3/tdb/tdb.c
@@
-853,6
+853,8
@@
static tdb_off tdb_allocate(TDB_CONTEXT *tdb, tdb_len length,
tdb_off rec_ptr, last_ptr, newrec_ptr;
struct list_struct newrec;
+ memset(&newrec, '\0', sizeof(newrec));
+
if (tdb_lock(tdb, -1, F_WRLCK) == -1)
return 0;