]> git.sur5r.net Git - openldap/commitdiff
MDB_VL32 fix cursor_unref - ignore cursor with empty stack
authorHoward Chu <hyc@openldap.org>
Mon, 28 Dec 2015 20:31:09 +0000 (20:31 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 28 Dec 2015 20:31:09 +0000 (20:31 +0000)
libraries/liblmdb/mdb.c

index 19930fcfc76780ab63ea8269241ef265b03c1944..ae32c9896124c1315500c017cf6a8a645757b43a 100644 (file)
@@ -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; i<mc->mc_snum; i++)
                mdb_page_unref(mc->mc_txn, mc->mc_pg[i]);