summaryrefslogtreecommitdiff
path: root/source3/tdb
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2004-01-08 05:37:23 +0000
committerAndrew Bartlett <abartlet@samba.org>2004-01-08 05:37:23 +0000
commitc69e4746d08fb90d77cbe58b29801e25999b5774 (patch)
tree480e8e96fda726421cb5bf11130ee88dbe75dee7 /source3/tdb
parente0ec9d2d5697bf95626da736f6f9552e10e52ffc (diff)
downloadsamba-c69e4746d08fb90d77cbe58b29801e25999b5774.tar.gz
samba-c69e4746d08fb90d77cbe58b29801e25999b5774.tar.bz2
samba-c69e4746d08fb90d77cbe58b29801e25999b5774.zip
In tdb_allocate(), we would create a new record by writing a local variable
'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)
Diffstat (limited to 'source3/tdb')
-rw-r--r--source3/tdb/tdb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/tdb/tdb.c b/source3/tdb/tdb.c
index c98b0936ed..ff70750385 100644
--- 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;