From 4b59b2db97af0b40fc2688069c3a91ba28f8883d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Wed, 13 Apr 2022 22:01:31 +0200 Subject: [PATCH] blame: use "goto cleanup" for cleanup_scoreboard() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Amend a freeing pattern added in 0906ac2b54b (blame: use changed-path Bloom filters, 2020-04-16) to use a "goto cleanup", so that we can be sure that we call cleanup_scoreboard(). Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- builtin/blame.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/builtin/blame.c b/builtin/blame.c index 8d15b68afc..885b381ab8 100644 --- a/builtin/blame.c +++ b/builtin/blame.c @@ -1167,7 +1167,7 @@ parse_done: if (!incremental) setup_pager(); else - return 0; + goto cleanup; blame_sort_final(&sb); @@ -1201,6 +1201,7 @@ parse_done: printf("num commits: %d\n", sb.num_commits); } +cleanup: cleanup_scoreboard(&sb); return 0; }