]> git.ipfire.org Git - thirdparty/git.git/commit
t/helper: fix leaking commit graph in "read-graph" subcommand
authorPatrick Steinhardt <ps@pks.im>
Wed, 20 Nov 2024 13:39:49 +0000 (14:39 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 20 Nov 2024 23:23:45 +0000 (08:23 +0900)
commit818e165898d5d3020c88c01544b69b2e65d7f644
treeea0df05a0ec6e9a609d1acff8b65088648f1fa5c
parentb97301c13c758f168019129fc888e6492c046752
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>
t/helper/test-read-graph.c