diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2022-07-01 13:37:39 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-07-01 23:38:50 +0300 |
commit | 34e691288d4e465fa457f6519ddbdc0f062a0619 (patch) | |
tree | cdde0f43e685f11e539e62a91544ffc78c0d35a5 /t/helper | |
parent | 9794633b4e9fefd83fa39c2fd05e9ac8068b744d (diff) |
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')
-rw-r--r-- | t/helper/test-ref-store.c | 1 |
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]); |