Merge branch 'mh/ref-locking-fix'
[git/git.git] / refs / files-backend.c
index 014dabb..8cc1e07 100644 (file)
@@ -2570,7 +2570,7 @@ static int files_transaction_prepare(struct ref_store *ref_store,
                ret = lock_ref_for_update(refs, update, transaction,
                                          head_ref, &affected_refnames, err);
                if (ret)
-                       break;
+                       goto cleanup;
 
                if (update->flags & REF_DELETING &&
                    !(update->flags & REF_LOG_ONLY) &&