From 9d6c973f765809cd616972c15c104311075a0998 Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Sat, 4 Jul 2015 13:48:04 +0200 Subject: [PATCH] Simpler mdb_txn_commit(). mt_env is always set. Commit(mt_child) resets mt_child, so parent need not. --- libraries/liblmdb/mdb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 73490db591..80a6eb977f 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -3287,12 +3287,11 @@ mdb_txn_commit(MDB_txn *txn) unsigned int i; MDB_env *env; - if (txn == NULL || txn->mt_env == NULL) + if (txn == NULL) return EINVAL; if (txn->mt_child) { rc = mdb_txn_commit(txn->mt_child); - txn->mt_child = NULL; if (rc) goto fail; } -- 2.39.2