From a2d1b42e3921d5c874a8f35fcd42047af604ce96 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 24 Aug 2012 05:23:55 -0700 Subject: [PATCH] ITS#7369 abort txn before exiting --- libraries/libmdb/mdb_stat.c | 1 + libraries/libmdb/mdb_stata.c | 1 + 2 files changed, 2 insertions(+) diff --git a/libraries/libmdb/mdb_stat.c b/libraries/libmdb/mdb_stat.c index a5f484d..5832e26 100644 --- a/libraries/libmdb/mdb_stat.c +++ b/libraries/libmdb/mdb_stat.c @@ -46,6 +46,7 @@ int main(int argc,char * argv[]) rc = mdb_open(txn, subname, 0, &dbi); if (rc) { printf("mdb_open failed, error %d\n", rc); + mdb_txn_abort(txn); exit(1); } diff --git a/libraries/libmdb/mdb_stata.c b/libraries/libmdb/mdb_stata.c index 106cb8e..62f019f 100644 --- a/libraries/libmdb/mdb_stata.c +++ b/libraries/libmdb/mdb_stata.c @@ -44,6 +44,7 @@ int main(int argc,char * argv[]) rc = mdb_open(txn, NULL, 0, &dbi); if (rc) { printf("mdb_open failed, error %d\n", rc); + mdb_txn_abort(txn); exit(1); }