From: Patrick Steinhardt Date: Wed, 20 Nov 2024 13:39:49 +0000 (+0100) Subject: t/helper: fix leaking commit graph in "read-graph" subcommand X-Git-Tag: v2.48.0-rc0~37^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=818e165898d5d3020c88c01544b69b2e65d7f644;p=thirdparty%2Fgit.git 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 Signed-off-by: Junio C Hamano --- diff --git a/t/helper/test-read-graph.c b/t/helper/test-read-graph.c index 9018c9f541..811dde1cb3 100644 --- a/t/helper/test-read-graph.c +++ b/t/helper/test-read-graph.c @@ -97,7 +97,6 @@ int cmd__read_graph(int argc, const char **argv) } done: - UNLEAK(graph); - + free_commit_graph(graph); return ret; }