Merge branch 'mr/packed-ref-store-fix'
Crash fix for a corner case where an error codepath tried to unlock what it did not acquire lock on. * mr/packed-ref-store-fix: files_initial_transaction_commit(): only unlock if lockedmaint
commit
2b72ea0a48
|
@ -2931,13 +2931,12 @@ static int files_initial_transaction_commit(struct ref_store *ref_store,
|
||||||
|
|
||||||
if (initial_ref_transaction_commit(packed_transaction, err)) {
|
if (initial_ref_transaction_commit(packed_transaction, err)) {
|
||||||
ret = TRANSACTION_GENERIC_ERROR;
|
ret = TRANSACTION_GENERIC_ERROR;
|
||||||
goto cleanup;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
packed_refs_unlock(refs->packed_ref_store);
|
||||||
cleanup:
|
cleanup:
|
||||||
if (packed_transaction)
|
if (packed_transaction)
|
||||||
ref_transaction_free(packed_transaction);
|
ref_transaction_free(packed_transaction);
|
||||||
packed_refs_unlock(refs->packed_ref_store);
|
|
||||||
transaction->state = REF_TRANSACTION_CLOSED;
|
transaction->state = REF_TRANSACTION_CLOSED;
|
||||||
string_list_clear(&affected_refnames, 0);
|
string_list_clear(&affected_refnames, 0);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in New Issue