From: Ævar Arnfjörð Bjarmason Date: Fri, 1 Jul 2022 10:37:39 +0000 (+0200) Subject: test-tool ref-store: fix a memory leak X-Git-Tag: v2.38.0-rc0~154^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=34e691288d4e465fa457f6519ddbdc0f062a0619;p=thirdparty%2Fgit.git test-tool ref-store: fix a memory leak Fix a memory leak introduced in fa099d23227 (worktree.c: kill parse_ref() in favor of refs_resolve_ref_unsafe(), 2017-04-24), as a result we can mark another test as passing with SANITIZE=leak using "TEST_PASSES_SANITIZE_LEAK=true". Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- diff --git a/t/helper/test-ref-store.c b/t/helper/test-ref-store.c index 9646d85fc8..4d18bfb1ca 100644 --- a/t/helper/test-ref-store.c +++ b/t/helper/test-ref-store.c @@ -96,6 +96,7 @@ static const char **get_store(const char **argv, struct ref_store **refs) die("no such worktree: %s", gitdir); *refs = get_worktree_ref_store(*p); + free_worktrees(worktrees); } else die("unknown backend %s", argv[0]);