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:

committed by
Junio C Hamano

parent
b97301c13c
commit
818e165898
@ -97,7 +97,6 @@ int cmd__read_graph(int argc, const char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
done:
|
done:
|
||||||
UNLEAK(graph);
|
free_commit_graph(graph);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user