diff options
author | Josh Steadmon <steadmon@google.com> | 2020-06-06 01:55:14 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-06-08 20:02:29 +0300 |
commit | 104de88675a16729ec317b87df045919e611d218 (patch) | |
tree | 4e8915b1e3ec000d2a57a2562bc7aa2d4f3d0f16 /fuzz-commit-graph.c | |
parent | c8828530b7797f5ab584c84dc2b86d3c14b39c8d (diff) |
fuzz-commit-graph: properly free graph struct
Use the provided free_commit_graph() to properly free the commit graph
in fuzz-commit-graph. Otherwise, the fuzzer itself leaks memory when the
struct contains pointers to allocated memory.
Signed-off-by: Josh Steadmon <steadmon@google.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'fuzz-commit-graph.c')
-rw-r--r-- | fuzz-commit-graph.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fuzz-commit-graph.c b/fuzz-commit-graph.c index 9fd1c04edd..430817214d 100644 --- a/fuzz-commit-graph.c +++ b/fuzz-commit-graph.c @@ -12,7 +12,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) initialize_the_repository(); g = parse_commit_graph((void *)data, size); repo_clear(the_repository); - free(g); + free_commit_graph(g); return 0; } |