Use release_revisions() for the "struct rev_info" in has_unstaged_changes() which didn't require the addition of a "goto" pattern, but needed us to refactor another "return fn(...)" pattern. This change is split from preceding changes to make similar conversions in those commits easier to review, as they are all repetitions of the same pattern. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> --- wt-status.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wt-status.c b/wt-status.c index a68731ea0f7..89289e52603 100644 --- a/wt-status.c +++ b/wt-status.c @@ -2537,7 +2537,9 @@ int has_unstaged_changes(struct repository *r, int ignore_submodules) rev_info.diffopt.flags.quick = 1; diff_setup_done(&rev_info.diffopt); result = run_diff_files(&rev_info, 0); - return diff_result_code(&rev_info.diffopt, result); + result = diff_result_code(&rev_info.diffopt, result); + release_revisions(&rev_info); + return result; } /** -- 2.35.1.1295.g6b025d3e231