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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/lib/dbwrap_util.c b/source3/lib/dbwrap_util.c
index 1105b083e0..eea7ca79d7 100644
--- a/source3/lib/dbwrap_util.c
+++ b/source3/lib/dbwrap_util.c
@@ -160,7 +160,7 @@ NTSTATUS dbwrap_trans_store(struct db_context *db, TDB_DATA key, TDB_DATA dbuf,
int flag)
{
int res;
- struct db_record *rec;
+ struct db_record *rec = NULL;
NTSTATUS status;
res = db->transaction_start(db);
@@ -194,6 +194,8 @@ NTSTATUS dbwrap_trans_store(struct db_context *db, TDB_DATA key, TDB_DATA dbuf,
return NT_STATUS_OK;
cancel:
+ TALLOC_FREE(rec);
+
if (db->transaction_cancel(db) != 0) {
smb_panic("Cancelling transaction failed");
}