t/helper: fix leaking commit graph in "read-graph" subcommand

We're leaking the commit-graph in the "test-helper read-graph"
subcommand, but as the leak is annotated with `UNLEAK()` the leak
sanitizer doesn't complain.

Fix the leak by calling `free_commit_graph()`. Besides getting rid of
the `UNLEAK()` annotation, it also increases code coverage because we
properly release resources as Git would do it, as well.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Patrick Steinhardt
2024-11-20 14:39:49 +01:00
committed by Junio C Hamano
parent b97301c13c
commit 818e165898

View File

@ -97,7 +97,6 @@ int cmd__read_graph(int argc, const char **argv)
}
done:
UNLEAK(graph);
free_commit_graph(graph);
return ret;
}