diff options
author | George Hazan <ghazan@miranda.im> | 2018-02-02 19:58:53 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-02-02 19:58:53 +0300 |
commit | a7c14294ccfc26f48b5e4c511b7dc65b7e3020a9 (patch) | |
tree | a0bea7d9b7356231ba344bac2c4327bf1e7e1240 /plugins/Dbx_mdbx | |
parent | 3253e019a8fec1dccbd5018a6f6195c248e335bc (diff) |
merge with libmdbx
Diffstat (limited to 'plugins/Dbx_mdbx')
-rw-r--r-- | plugins/Dbx_mdbx/src/libmdbx/src/mdbx.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/plugins/Dbx_mdbx/src/libmdbx/src/mdbx.c b/plugins/Dbx_mdbx/src/libmdbx/src/mdbx.c index a8e0500326..b3ce3388d5 100644 --- a/plugins/Dbx_mdbx/src/libmdbx/src/mdbx.c +++ b/plugins/Dbx_mdbx/src/libmdbx/src/mdbx.c @@ -2966,7 +2966,6 @@ static int mdbx_txn_end(MDBX_txn *txn, unsigned mode) { env->me_last_reclaimed = 0; env->me_txn = NULL; - mode = 0; /* txn == env->me_txn0, do not free() it */ /* The writer mutex was locked in mdbx_txn_begin. */ mdbx_txn_unlock(env); @@ -2982,9 +2981,8 @@ static int mdbx_txn_end(MDBX_txn *txn, unsigned mode) { mdbx_pnl_free(pghead); } - mdbx_assert(env, txn->mt_owner == 0); - if (mode & MDBX_END_FREE) { - mdbx_ensure(env, txn != env->me_txn0); + mdbx_assert(env, txn == env->me_txn0 || txn->mt_owner == 0); + if ((mode & MDBX_END_FREE) != 0 && txn != env->me_txn0) { txn->mt_signature = 0; free(txn); } |