diff options
| author | Patrick Steinhardt <ps@pks.im> | 2024-11-20 14:39:49 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-11-21 08:23:45 +0900 |
| commit | 818e165898d5d3020c88c01544b69b2e65d7f644 (patch) | |
| tree | ea0df05a0ec6e9a609d1acff8b65088648f1fa5c /t/helper/test-read-graph.c | |
| parent | builtin/branch: fix leaking sorting options (diff) | |
| download | git-818e165898d5d3020c88c01544b69b2e65d7f644.tar.gz git-818e165898d5d3020c88c01544b69b2e65d7f644.zip | |
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>
Diffstat (limited to 't/helper/test-read-graph.c')
| -rw-r--r-- | t/helper/test-read-graph.c | 3 |
1 files changed, 1 insertions, 2 deletions
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; } |
