mirror of
https://github.com/isar/libmdbx.git
synced 2024-10-30 11:29:19 +08:00
mdbx: fix uninit fields in page_malloc().
Change-Id: I35a162d6b391d33eda4d508e9c1af7238b33665d
This commit is contained in:
parent
fed7922b30
commit
cee258fe86
4
mdb.c
4
mdb.c
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user