summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib')
-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 eea7ca79d7..07e50827d4 100644
--- a/source3/lib/dbwrap_util.c
+++ b/source3/lib/dbwrap_util.c
@@ -205,7 +205,7 @@ NTSTATUS dbwrap_trans_store(struct db_context *db, TDB_DATA key, TDB_DATA dbuf,
NTSTATUS dbwrap_trans_delete(struct db_context *db, TDB_DATA key)
{
int res;
- struct db_record *rec;
+ struct db_record *rec = NULL;
NTSTATUS status;
res = db->transaction_start(db);
@@ -239,6 +239,8 @@ NTSTATUS dbwrap_trans_delete(struct db_context *db, TDB_DATA key)
return NT_STATUS_OK;
cancel:
+ TALLOC_FREE(rec);
+
if (db->transaction_cancel(db) != 0) {
smb_panic("Cancelling transaction failed");
}