summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/net_idmap.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/source3/utils/net_idmap.c b/source3/utils/net_idmap.c
index 782b553749..bdc4879e88 100644
--- a/source3/utils/net_idmap.c
+++ b/source3/utils/net_idmap.c
@@ -475,11 +475,13 @@ NTSTATUS dbwrap_delete_mapping(struct db_context *db, TDB_DATA key1, bool force)
goto done;
}
- if (is_valid_mapping) {
- status = dbwrap_delete(db, val1);
- if (!NT_STATUS_IS_OK(status)) {
- DEBUG(1, ("failed to delete: %.*s\n", (int)val1.dsize, val1.dptr));
- }
+ if (!is_valid_mapping) {
+ goto done;
+ }
+
+ status = dbwrap_delete(db, val1);
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(1, ("failed to delete: %.*s\n", (int)val1.dsize, val1.dptr));
}
done: