summaryrefslogtreecommitdiff
path: root/graph.c
diff options
context:
space:
mode:
Diffstat (limited to 'graph.c')
-rw-r--r--graph.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/graph.c b/graph.c
index e3828eb8f2..568b6e7cd4 100644
--- a/graph.c
+++ b/graph.c
@@ -401,6 +401,18 @@ struct git_graph *graph_init(struct rev_info *opt)
return graph;
}
+void graph_clear(struct git_graph *graph)
+{
+ if (!graph)
+ return;
+
+ free(graph->columns);
+ free(graph->new_columns);
+ free(graph->mapping);
+ free(graph->old_mapping);
+ free(graph);
+}
+
static void graph_update_state(struct git_graph *graph, enum graph_state s)
{
graph->prev_state = graph->state;