Skip to content

Commit 3c9b393

Browse files
committed
Merge branch 'js/commit-graph-parse-leakfix'
Leakfix. * js/commit-graph-parse-leakfix: commit-graph: fix memory leak
2 parents 6795fc8 + 98552f2 commit 3c9b393

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

commit-graph.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,10 @@ struct commit_graph *parse_commit_graph(void *graph_map, int fd,
267267
last_chunk_offset = chunk_offset;
268268
}
269269

270-
if (verify_commit_graph_lite(graph))
270+
if (verify_commit_graph_lite(graph)) {
271+
free(graph);
271272
return NULL;
273+
}
272274

273275
return graph;
274276
}

0 commit comments

Comments
 (0)