From 1f191ba930938d6860e68f859fb1eb8374fbe799 Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Tue, 31 Dec 2013 02:16:19 +0100 Subject: [PATCH] mdb_page_malloc(): Move VGMEMP_ALLOC before memset --- libraries/liblmdb/mdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.39.5