mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-20 22:59:34 -05:00
mdb_page_malloc(): Move VGMEMP_ALLOC before memset
This commit is contained in:
parent
ce2a0d4016
commit
1f191ba930
1 changed files with 1 additions and 1 deletions
|
|
@ -1389,11 +1389,11 @@ mdb_page_malloc(MDB_txn *txn, unsigned num)
|
||||||
off = sz - psize;
|
off = sz - psize;
|
||||||
}
|
}
|
||||||
if ((ret = malloc(sz)) != NULL) {
|
if ((ret = malloc(sz)) != NULL) {
|
||||||
|
VGMEMP_ALLOC(env, ret, sz);
|
||||||
if (!(env->me_flags & MDB_NOMEMINIT)) {
|
if (!(env->me_flags & MDB_NOMEMINIT)) {
|
||||||
memset((char *)ret + off, 0, psize);
|
memset((char *)ret + off, 0, psize);
|
||||||
ret->mp_pad = 0;
|
ret->mp_pad = 0;
|
||||||
}
|
}
|
||||||
VGMEMP_ALLOC(env, ret, sz);
|
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue