From c2c74075e76a4b43bd46560192029afd530e30af Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Thu, 14 May 2020 01:07:56 +0300 Subject: [PATCH] mdbx: fix Valgrind minor warning with MDBX_DEBUG > 1. Change-Id: Idb93c6a3843e76071a55cbd6c34ddd22541c77d3 --- src/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core.c b/src/core.c index d7e4aaf1..1dc75000 100644 --- a/src/core.c +++ b/src/core.c @@ -3999,11 +3999,12 @@ static int mdbx_page_loose(MDBX_txn *txn, MDBX_page *mp) { return MDBX_SUCCESS; } + mp->mp_pgno = pgno; mp->mp_flags = P_LOOSE | P_DIRTY; mp->mp_next = txn->tw.loose_pages; txn->tw.loose_pages = mp; txn->tw.loose_count++; - if (unlikely(txn->mt_next_pgno == mp->mp_pgno + 1)) + if (unlikely(txn->mt_next_pgno == pgno + 1)) mdbx_refund(txn); return MDBX_SUCCESS;