]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
Use mdb_page_loose() more
authorHallvard Furuseth <hallvard@openldap.org>
Tue, 25 Jul 2017 19:27:36 +0000 (21:27 +0200)
committerHoward Chu <hyc@openldap.org>
Sat, 10 Oct 2020 11:57:46 +0000 (12:57 +0100)
libraries/liblmdb/mdb.c

index 3e0aa98340dd9e6d4c535d28dad5decf4a2698cb..05273a25ab976499b7c2d7af9539adb55d513b10 100644 (file)
@@ -9493,7 +9493,7 @@ mdb_rebalance(MDB_cursor *mc)
                        mc->mc_db->md_root = P_INVALID;
                        mc->mc_db->md_depth = 0;
                        mc->mc_db->md_leaf_pages = 0;
-                       rc = mdb_midl_append(&mc->mc_txn->mt_free_pgs, mp->mp_pgno);
+                       rc = mdb_page_loose(mc, mp);
                        if (rc)
                                return rc;
                        /* Adjust cursors pointing to mp */
@@ -9521,7 +9521,7 @@ mdb_rebalance(MDB_cursor *mc)
                } else if (IS_BRANCH(mp) && NUMKEYS(mp) == 1) {
                        int i;
                        DPUTS("collapsing root page!");
-                       rc = mdb_midl_append(&mc->mc_txn->mt_free_pgs, mp->mp_pgno);
+                       rc = mdb_page_loose(mc, mp);
                        if (rc)
                                return rc;
                        mc->mc_db->md_root = NODEPGNO(NODEPTR(mp, 0));