Skip to content

Commit 104de88

Browse files
steadmongitster
authored andcommitted
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 <[email protected]> Reviewed-by: Jonathan Nieder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c882853 commit 104de88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fuzz-commit-graph.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
1212
initialize_the_repository();
1313
g = parse_commit_graph((void *)data, size);
1414
repo_clear(the_repository);
15-
free(g);
15+
free_commit_graph(g);
1616

1717
return 0;
1818
}

0 commit comments

Comments
 (0)