Skip to content

Commit 34e6912

Browse files
avargitster
authored andcommitted
test-tool ref-store: fix a memory leak
Fix a memory leak introduced in fa099d2 (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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9794633 commit 34e6912

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

t/helper/test-ref-store.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ static const char **get_store(const char **argv, struct ref_store **refs)
9696
die("no such worktree: %s", gitdir);
9797

9898
*refs = get_worktree_ref_store(*p);
99+
free_worktrees(worktrees);
99100
} else
100101
die("unknown backend %s", argv[0]);
101102

0 commit comments

Comments
 (0)