summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/net_registry.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/source3/utils/net_registry.c b/source3/utils/net_registry.c
index 803e12181b..d12e5879a5 100644
--- a/source3/utils/net_registry.c
+++ b/source3/utils/net_registry.c
@@ -1298,13 +1298,14 @@ static int net_registry_import(struct net_context *c, int argc,
if (ret < 0) {
d_printf("Transaction canceled!\n");
regdb_transaction_cancel();
- } else {
- werr = regdb_transaction_commit();
- if (!W_ERROR_IS_OK(werr)) {
- d_printf("Failed to commit transaction on regdb: %s\n",
- win_errstr(werr));
- ret = -1;
- }
+ goto done;
+ }
+
+ werr = regdb_transaction_commit();
+ if (!W_ERROR_IS_OK(werr)) {
+ d_printf("Failed to commit transaction on regdb: %s\n",
+ win_errstr(werr));
+ ret = -1;
}
done: