test-tool ref-store: fix a memory leak
Fix a memory leak introduced in fa099d2322
(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>
This commit is contained in:
parent
9794633b4e
commit
34e691288d
@ -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]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user