From 2c2379b3216580bfc3f450221cdd325b2dccc80e Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Mon, 7 Apr 2008 23:36:29 +0200 Subject: dbwrap: fix more "tdb_chainunlock failed" messages TALLOC_FREE(rec) before transaction_cancel also in dbwrap_trans_delete(). Michael (This used to be commit 04cd914a1f12691d27ddc67887a757cd813848a7) --- source3/lib/dbwrap_util.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source3/lib') 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"); } -- cgit