dsdb: Ensure to cancel the transaction if we fail to save the prefixMap
authorAndrew Bartlett <abartlet@samba.org>
Mon, 9 Apr 2018 02:52:47 +0000 (14:52 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 12 Apr 2018 03:15:16 +0000 (05:15 +0200)
This rare error case forgot to call ldb_transaction_cancel()

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
source4/dsdb/repl/replicated_objects.c

index 0c44960cf5f3171419ee406ccebbc50f53049f92..4c8890f055305255a44c3d89be70416a1a5957ef 100644 (file)
@@ -921,6 +921,7 @@ WERROR dsdb_replicated_objects_commit(struct ldb_context *ldb,
                        }
                        DEBUG(0,("Failed to save updated prefixMap: %s\n",
                                 win_errstr(werr)));
+                       ldb_transaction_cancel(ldb);
                        TALLOC_FREE(tmp_ctx);
                        return werr;
                }