]> git.sur5r.net Git - openldap/commitdiff
Must do dlist_free before releasing Wmutex
authorHoward Chu <hyc@symas.com>
Sun, 20 Jul 2014 15:10:34 +0000 (08:10 -0700)
committerHallvard Furuseth <hallvard@openldap.org>
Mon, 1 Dec 2014 19:15:35 +0000 (20:15 +0100)
libraries/liblmdb/mdb.c

index 1d52c4f82d713fb55ac165116a52bac1a8790ed3..81fe20510da17c7ac779805b8879d2d90e03d12a 100644 (file)
@@ -2778,6 +2778,10 @@ mdb_txn_reset0(MDB_txn *txn, const char *act)
                env->me_pghead = NULL;
                env->me_pglast = 0;
 
+               if (!(env->me_flags & MDB_WRITEMAP)) {
+                       mdb_dlist_free(txn);
+               }
+
                if (!txn->mt_parent) {
                        if (mdb_midl_shrink(&txn->mt_free_pgs))
                                env->me_free_pgs = txn->mt_free_pgs;
@@ -2790,9 +2794,6 @@ mdb_txn_reset0(MDB_txn *txn, const char *act)
 
                mdb_cursors_close(txn, 0);
 
-               if (!(env->me_flags & MDB_WRITEMAP)) {
-                       mdb_dlist_free(txn);
-               }
                mdb_midl_free(pghead);
 
                if (txn->mt_parent) {