Merge branch 'js/ort-clean-up-after-failed-merge'
Plug memory leaks in the failure code path in the "merge-ort" merge strategy backend. * js/ort-clean-up-after-failed-merge: merge-ort: do leave trace2 region even if checkout fails merge-ort: clean up after failed merge
This commit is contained in:
commit
bac92b1f39
@ -4536,6 +4536,8 @@ void merge_switch_to_result(struct merge_options *opt,
|
|||||||
if (checkout(opt, head, result->tree)) {
|
if (checkout(opt, head, result->tree)) {
|
||||||
/* failure to function */
|
/* failure to function */
|
||||||
result->clean = -1;
|
result->clean = -1;
|
||||||
|
merge_finalize(opt, result);
|
||||||
|
trace2_region_leave("merge", "checkout", opt->repo);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
trace2_region_leave("merge", "checkout", opt->repo);
|
trace2_region_leave("merge", "checkout", opt->repo);
|
||||||
@ -4546,6 +4548,9 @@ void merge_switch_to_result(struct merge_options *opt,
|
|||||||
/* failure to function */
|
/* failure to function */
|
||||||
opt->priv = NULL;
|
opt->priv = NULL;
|
||||||
result->clean = -1;
|
result->clean = -1;
|
||||||
|
merge_finalize(opt, result);
|
||||||
|
trace2_region_leave("merge", "record_conflicted",
|
||||||
|
opt->repo);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
opt->priv = NULL;
|
opt->priv = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user