ldb: Ensure to decrement the transaction_active whenever we delete a transaction
[metze/samba/wip.git] / lib / ldb / common / ldb.c
index 7a997f78243ef9466a903b70c893006a6c3e7682..3dc6d872289e1374f23f1f0c89b364321ec5b360 100644 (file)
@@ -408,6 +408,7 @@ int ldb_transaction_prepare_commit(struct ldb_context *ldb)
 
        status = module->ops->prepare_commit(module);
        if (status != LDB_SUCCESS) {
+               ldb->transaction_active--;
                /* if a module fails the prepare then we need
                   to call the end transaction for everyone */
                FIRST_OP(ldb, del_transaction);