Skip to content

Commit 9d6c973

Browse files
committed
Simpler mdb_txn_commit().
mt_env is always set. Commit(mt_child) resets mt_child, so parent need not.
1 parent ee06adb commit 9d6c973

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

libraries/liblmdb/mdb.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3287,12 +3287,11 @@ mdb_txn_commit(MDB_txn *txn)
32873287
unsigned int i;
32883288
MDB_env *env;
32893289

3290-
if (txn == NULL || txn->mt_env == NULL)
3290+
if (txn == NULL)
32913291
return EINVAL;
32923292

32933293
if (txn->mt_child) {
32943294
rc = mdb_txn_commit(txn->mt_child);
3295-
txn->mt_child = NULL;
32963295
if (rc)
32973296
goto fail;
32983297
}

0 commit comments

Comments
 (0)