diff options
author | Michael Adam <obnox@samba.org> | 2009-07-29 14:22:37 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2009-07-29 16:26:22 +0200 |
commit | 80abb95ead3c51702bb459b9af9788b6960361f9 (patch) | |
tree | 7887649506db137941d3cc0bdb1ece850af9bafc /source3/lib | |
parent | aa4e5a32a7ee3e71fc0b69ad7e8bd44b57c9273d (diff) | |
download | samba-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.c | 5 |
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; } |