1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-03 04:22:09 +03:00

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 commit is contained in:
Andrew Bartlett
-
parent 7e6cc8f003
commit c9f9d6d317

View File

@ -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;