summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-03-30 13:11:22 +0200
committerStefan Metzmacher <metze@samba.org>2008-04-01 14:04:23 +0200
commit20dc21f4740588eb9ff95c223cc82bea7b3aa9f7 (patch)
tree1e223717ffa9ab5a0cd84233ef0287e8e718db37 /source3
parent3f076ab77384500d6d08ee8b977338ee88911dfe (diff)
downloadsamba-20dc21f4740588eb9ff95c223cc82bea7b3aa9f7.tar.gz
samba-20dc21f4740588eb9ff95c223cc82bea7b3aa9f7.tar.bz2
samba-20dc21f4740588eb9ff95c223cc82bea7b3aa9f7.zip
dbwrap: fix a confusing "tdb_chainunlock failed" message
Unlock before we cancel the transaction... metze (This used to be commit d70a8e9c413a7d3993e0d11db5ae9cbc7fdb12c7)
Diffstat (limited to 'source3')
-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");
}