]> git.sur5r.net Git - openldap/commitdiff
ITS#7369 abort txn before exiting
authorHoward Chu <hyc@symas.com>
Fri, 24 Aug 2012 12:23:55 +0000 (05:23 -0700)
committerHoward Chu <hyc@symas.com>
Fri, 24 Aug 2012 12:23:55 +0000 (05:23 -0700)
libraries/libmdb/mdb_stat.c
libraries/libmdb/mdb_stata.c

index a5f484d0637ac873c66532bc4dac85a2e6f9b2c1..5832e267c76bc87d012e0552490a856cd1d6d811 100644 (file)
@@ -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);
        }
    
index 106cb8eb1fa1cedbd6f561867caf73ecab056115..62f019fe9440c021ae3deddc83c759b1a72e476a 100644 (file)
@@ -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);
        }