Skip to content

Commit 8ab8279

Browse files
pks-tgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 54e8654 commit 8ab8279

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

t/helper/test-read-graph.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ int cmd__read_graph(int argc, const char **argv)
9797
}
9898

9999
done:
100-
UNLEAK(graph);
101-
100+
free_commit_graph(graph);
102101
return ret;
103102
}

0 commit comments

Comments
 (0)