From 53f624bff0d7d08b64b48ab0c6683f4145b9bcac Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Mon, 28 Dec 2015 20:31:09 +0000 Subject: [PATCH] MDB_VL32 fix cursor_unref - ignore cursor with empty stack --- 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 19930fcfc7..ae32c98961 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -1952,7 +1952,7 @@ static void mdb_cursor_unref(MDB_cursor *mc) { int i; - if (!mc->mc_pg[0] || IS_SUBP(mc->mc_pg[0])) + if (!mc->mc_snum || !mc->mc_pg[0] || IS_SUBP(mc->mc_pg[0])) return; for (i=0; imc_snum; i++) mdb_page_unref(mc->mc_txn, mc->mc_pg[i]); -- 2.39.5