1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-29 11:21:54 +03:00

don't leave a dangling transaction on retry error

This commit is contained in:
Andrew Tridgell 2008-08-08 11:41:21 +10:00 committed by Michael Adam
parent fe6a03e7b1
commit ddf3022595

View File

@ -210,7 +210,8 @@ NTSTATUS dbwrap_trans_store(struct db_context *db, TDB_DATA key, TDB_DATA dbuf,
if (res != 0) { if (res != 0) {
DEBUG(5, ("tdb_transaction_commit failed\n")); DEBUG(5, ("tdb_transaction_commit failed\n"));
status = NT_STATUS_INTERNAL_DB_CORRUPTION; status = NT_STATUS_INTERNAL_DB_CORRUPTION;
goto cancel; TALLOC_FREE(rec);
return status;
} }
return NT_STATUS_OK; return NT_STATUS_OK;
@ -255,7 +256,8 @@ NTSTATUS dbwrap_trans_delete(struct db_context *db, TDB_DATA key)
if (res != 0) { if (res != 0) {
DEBUG(5, ("tdb_transaction_commit failed\n")); DEBUG(5, ("tdb_transaction_commit failed\n"));
status = NT_STATUS_INTERNAL_DB_CORRUPTION; status = NT_STATUS_INTERNAL_DB_CORRUPTION;
goto cancel; TALLOC_FREE(rec);
return status;
} }
return NT_STATUS_OK; return NT_STATUS_OK;