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); }