mdbx: fix crash on twice txn-end (backport from devel).

This commit is contained in:
Leo Yuriev 2017-05-25 20:42:18 +03:00
parent 7a5decc779
commit ef941b2587

3
mdb.c
View File

@ -3258,7 +3258,8 @@ mdb_txn_end(MDB_txn *txn, unsigned mode)
if (mode & MDB_END_FREE) {
txn->mt_signature = 0;
free(txn);
if (txn != env->me_txn0)
free(txn);
}
return MDB_SUCCESS;