log: fix memory leak if --graph is passed multiple times

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Alex Henrie
2022-02-11 09:36:24 -07:00
committed by Junio C Hamano
parent 2b9c120970
commit dccf6c16f1
3 changed files with 18 additions and 0 deletions

View File

@@ -139,6 +139,11 @@ void graph_set_column_colors(const char **colors, unsigned short colors_max);
*/
struct git_graph *graph_init(struct rev_info *opt);
/*
* Free a struct git_graph.
*/
void graph_clear(struct git_graph *graph);
/*
* Update a git_graph with a new commit.
* This will cause the graph to begin outputting lines for the new commit