From 34e691288d4e465fa457f6519ddbdc0f062a0619 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Fri, 1 Jul 2022 12:37:39 +0200 Subject: [PATCH] test-tool ref-store: fix a memory leak MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- t/helper/test-ref-store.c | 1 + 1 file changed, 1 insertion(+) 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]);