From 74928f6a3b8e22e1690a962d41d0e9f4a1004f32 Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Tue, 25 Jul 2017 21:03:48 +0200 Subject: [PATCH] Fix broken mdb_page_get(ovpage) optimization --- libraries/liblmdb/mdb.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 3e42574..9da57c6 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -8341,10 +8341,7 @@ mdb_cursor_del(MDB_cursor *mc, unsigned int flags) MDB_ovpage ovp; memcpy(&ovp, NODEDATA(leaf), sizeof(ovp)); - /* note we don't care about page count here since - * we're just adding pgno to the freelist anyway - */ - if ((rc = MDB_PAGE_GET(mc, ovp.op_pgno, 1, &omp, NULL)) || + if ((rc = MDB_PAGE_GET(mc, ovp.op_pgno, ovp.op_pages, &omp, NULL)) || (rc = mdb_ovpage_free(mc, omp))) goto fail; }