summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2009-07-29 14:22:37 +0200
committerMichael Adam <obnox@samba.org>2009-07-29 16:26:22 +0200
commit80abb95ead3c51702bb459b9af9788b6960361f9 (patch)
tree7887649506db137941d3cc0bdb1ece850af9bafc /source3/lib
parentaa4e5a32a7ee3e71fc0b69ad7e8bd44b57c9273d (diff)
downloadsamba-80abb95ead3c51702bb459b9af9788b6960361f9.tar.gz
samba-80abb95ead3c51702bb459b9af9788b6960361f9.tar.bz2
samba-80abb95ead3c51702bb459b9af9788b6960361f9.zip
s3:dbwrap: don't leak in dbwrap_change_uint32_atomic()
Michael
Diffstat (limited to 'source3/lib')
-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;
}