summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-04-07 23:36:29 +0200
committerMichael Adam <obnox@samba.org>2008-04-07 23:40:18 +0200
commit2c2379b3216580bfc3f450221cdd325b2dccc80e (patch)
tree30d41b724847fa1bdefb932007e06a3d7fb185aa /source3/lib
parentbc5f19cb28e26206e216396d6561f05d77cf9ffa (diff)
downloadsamba-2c2379b3216580bfc3f450221cdd325b2dccc80e.tar.gz
samba-2c2379b3216580bfc3f450221cdd325b2dccc80e.tar.bz2
samba-2c2379b3216580bfc3f450221cdd325b2dccc80e.zip
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)
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");
}