summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/dbwrap_util.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/lib/dbwrap_util.c b/source3/lib/dbwrap_util.c
index 549fd46624..b9b525a47b 100644
--- a/source3/lib/dbwrap_util.c
+++ b/source3/lib/dbwrap_util.c
@@ -125,7 +125,8 @@ NTSTATUS dbwrap_change_uint32_atomic(struct db_context *db, const char *keystr,
val = IVAL(rec->value.dptr, 0);
*oldval = val;
} else {
- return NT_STATUS_UNSUCCESSFUL;
+ ret = NT_STATUS_UNSUCCESSFUL;
+ goto done;
}
val += change_val;
@@ -135,8 +136,8 @@ NTSTATUS dbwrap_change_uint32_atomic(struct db_context *db, const char *keystr,
ret = rec->store(rec, data, TDB_REPLACE);
+done:
TALLOC_FREE(rec);
-
return ret;
}