mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-04 17:34:14 +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
|
#endif
|
||||||
VALGRIND_MAKE_MEM_UNDEFINED(np, size);
|
VALGRIND_MAKE_MEM_UNDEFINED(np, size);
|
||||||
|
np->mp_flags = 0;
|
||||||
|
np->mp_pages = num;
|
||||||
return np;
|
return np;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2317,6 +2319,8 @@ done:
|
|||||||
|
|
||||||
np->mp_pgno = pgno;
|
np->mp_pgno = pgno;
|
||||||
np->mp_ksize = 0;
|
np->mp_ksize = 0;
|
||||||
|
np->mp_flags = 0;
|
||||||
|
np->mp_pages = num;
|
||||||
mdb_page_dirty(txn, np);
|
mdb_page_dirty(txn, np);
|
||||||
*mp = np;
|
*mp = np;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user