From: Howard Chu Date: Sun, 20 Jul 2014 15:10:34 +0000 (-0700) Subject: Must do dlist_free before releasing Wmutex X-Git-Tag: LMDB_0.9.15~64 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=df9da7c7bef99fb96ddc070dda2d505a8b8e8143;p=openldap Must do dlist_free before releasing Wmutex --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 1d52c4f82d..81fe20510d 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -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) {