From: Hallvard Furuseth Date: Tue, 31 Dec 2013 01:16:19 +0000 (+0100) Subject: mdb_page_malloc(): Move VGMEMP_ALLOC before memset X-Git-Tag: OPENLDAP_REL_ENG_2_4_39~21^2~8 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1f191ba930938d6860e68f859fb1eb8374fbe799;p=openldap mdb_page_malloc(): Move VGMEMP_ALLOC before memset --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index a6d7791a5a..e6ac29930d 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -1389,11 +1389,11 @@ mdb_page_malloc(MDB_txn *txn, unsigned num) off = sz - psize; } if ((ret = malloc(sz)) != NULL) { + VGMEMP_ALLOC(env, ret, sz); if (!(env->me_flags & MDB_NOMEMINIT)) { memset((char *)ret + off, 0, psize); ret->mp_pad = 0; } - VGMEMP_ALLOC(env, ret, sz); } return ret; }