From 234cd9dfb54ef2f7f83963d95b6eb8e9735bb372 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 26 Jul 2012 08:42:41 -0700 Subject: [PATCH] Fix txn_commit error check --- libraries/libmdb/mdb.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libraries/libmdb/mdb.c b/libraries/libmdb/mdb.c index 85bacdac7e..4563e23e8b 100644 --- a/libraries/libmdb/mdb.c +++ b/libraries/libmdb/mdb.c @@ -1913,7 +1913,11 @@ mdb_txn_commit(MDB_txn *txn) key.mv_data = &cur; mdb_cursor_set(&mc, &key, NULL, MDB_SET, &exact); - mdb_cursor_del(&mc, 0); + rc = mdb_cursor_del(&mc, 0); + if (rc) { + mdb_txn_abort(txn); + return rc; + } } env->me_pgfirst = 0; env->me_pglast = 0;