aboutsummaryrefslogtreecommitdiffstats
path: root/t/helper/test-ref-store.c
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2022-07-01 12:37:39 +0200
committerJunio C Hamano <gitster@pobox.com>2022-07-01 13:38:50 -0700
commit34e691288d4e465fa457f6519ddbdc0f062a0619 (patch)
treecdde0f43e685f11e539e62a91544ffc78c0d35a5 /t/helper/test-ref-store.c
parenttest-tool bloom: fix memory leaks (diff)
downloadgit-34e691288d4e465fa457f6519ddbdc0f062a0619.tar.gz
git-34e691288d4e465fa457f6519ddbdc0f062a0619.zip
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 <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/helper/test-ref-store.c')
-rw-r--r--t/helper/test-ref-store.c1
1 files changed, 1 insertions, 0 deletions
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]);