summaryrefslogtreecommitdiff
path: root/source3/lib/dbwrap_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/dbwrap_util.c')
-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 b9b525a47b..1e3755af98 100644
--- a/source3/lib/dbwrap_util.c
+++ b/source3/lib/dbwrap_util.c
@@ -167,7 +167,8 @@ NTSTATUS dbwrap_change_int32_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;
@@ -177,8 +178,8 @@ NTSTATUS dbwrap_change_int32_atomic(struct db_context *db, const char *keystr,
ret = rec->store(rec, data, TDB_REPLACE);
+done:
TALLOC_FREE(rec);
-
return ret;
}