ldb: Unwind transaction counter if start_transaction fails
authorGary Lockyer <gary@catalyst.net.nz>
Thu, 22 Mar 2018 22:23:39 +0000 (11:23 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 6 Apr 2018 00:08:45 +0000 (02:08 +0200)
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
lib/ldb/common/ldb.c

index a4d9977d1b4f5fb6646bd412f7d44295ba60ca2f..2249089d0877b30b7b525264e838c1f3ef2eda14 100644 (file)
@@ -379,6 +379,7 @@ int ldb_transaction_start(struct ldb_context *ldb)
                                "ldb transaction start: %s (%d)",
                                ldb_strerror(status),
                                status);
+               ldb->transaction_active--;
                }
                if ((next_module && next_module->ldb->flags & LDB_FLG_ENABLE_TRACING)) {
                        ldb_debug(next_module->ldb, LDB_DEBUG_TRACE, "start ldb transaction error: %s",