mdbx: fix uninit fields in page_malloc().

Change-Id: I35a162d6b391d33eda4d508e9c1af7238b33665d
This commit is contained in:
Leo Yuriev 2015-11-16 12:20:47 +03:00
parent fed7922b30
commit cee258fe86

4
mdb.c
View File

@ -1521,6 +1521,8 @@ mdb_page_malloc(MDB_txn *txn, unsigned num)
}
#endif
VALGRIND_MAKE_MEM_UNDEFINED(np, size);
np->mp_flags = 0;
np->mp_pages = num;
return np;
}
@ -2317,6 +2319,8 @@ done:
np->mp_pgno = pgno;
np->mp_ksize = 0;
np->mp_flags = 0;
np->mp_pages = num;
mdb_page_dirty(txn, np);
*mp = np;