summaryrefslogtreecommitdiffstats
path: root/source/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
commitc9f9d6d3171d720b4ec0ba6af8c0c8ab178cd98b (patch)
treee472a0ddf4009f7c92bdde6985cc423cab86cbec /source/tdb
parent7e6cc8f0037f9948230a1e1bd380f30cec5d511e (diff)
downloadsamba-c9f9d6d3171d720b4ec0ba6af8c0c8ab178cd98b.tar.gz
samba-c9f9d6d3171d720b4ec0ba6af8c0c8ab178cd98b.tar.xz
samba-c9f9d6d3171d720b4ec0ba6af8c0c8ab178cd98b.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
Diffstat (limited to 'source/tdb')
-rw-r--r--source/tdb/tdb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/tdb/tdb.c b/source/tdb/tdb.c
index c98b0936ed0..ff707503855 100644
--- a/source/tdb/tdb.c
+++ b/source/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;