From a53716ed968671a8df5e1fd6ca23cb959cf61e2d Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sun, 20 Jul 2014 08:10:34 -0700 Subject: [PATCH] Must do dlist_free before releasing Wmutex --- libraries/liblmdb/mdb.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index cc15a1bfd1..6179b57868 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -2801,6 +2801,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; @@ -2813,9 +2817,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) { -- 2.39.5