summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-08-08 11:41:21 +1000
committerMichael Adam <obnox@samba.org>2008-08-13 11:54:10 +0200
commit312a04528c2f3439f0451414fee224dfa4fcb6f4 (patch)
treedd08c36d7d651a24ac8715c4adc05e755f1e3eee /source3
parent0f8a6859e63b5d842caf231e7003732051815963 (diff)
downloadsamba-312a04528c2f3439f0451414fee224dfa4fcb6f4.tar.gz
samba-312a04528c2f3439f0451414fee224dfa4fcb6f4.tar.bz2
samba-312a04528c2f3439f0451414fee224dfa4fcb6f4.zip
don't leave a dangling transaction on retry error
(This used to be commit ddf3022595fe8ca378c5f52107f42e296f852685)
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/dbwrap_util.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/lib/dbwrap_util.c b/source3/lib/dbwrap_util.c
index 09e9071d8c..ddc613150b 100644
--- a/source3/lib/dbwrap_util.c
+++ b/source3/lib/dbwrap_util.c
@@ -210,7 +210,8 @@ NTSTATUS dbwrap_trans_store(struct db_context *db, TDB_DATA key, TDB_DATA dbuf,
if (res != 0) {
DEBUG(5, ("tdb_transaction_commit failed\n"));
status = NT_STATUS_INTERNAL_DB_CORRUPTION;
- goto cancel;
+ TALLOC_FREE(rec);
+ return status;
}
return NT_STATUS_OK;
@@ -255,7 +256,8 @@ NTSTATUS dbwrap_trans_delete(struct db_context *db, TDB_DATA key)
if (res != 0) {
DEBUG(5, ("tdb_transaction_commit failed\n"));
status = NT_STATUS_INTERNAL_DB_CORRUPTION;
- goto cancel;
+ TALLOC_FREE(rec);
+ return status;
}
return NT_STATUS_OK;