Merge branch 'js/commit-graph-parse-leakfix'

Leakfix.

* js/commit-graph-parse-leakfix:
  commit-graph: fix memory leak
This commit is contained in:
Junio C Hamano 2019-05-19 16:45:28 +09:00
commit 3c9b393ca8
1 changed files with 3 additions and 1 deletions

View File

@ -267,8 +267,10 @@ struct commit_graph *parse_commit_graph(void *graph_map, int fd,
last_chunk_offset = chunk_offset;
}
if (verify_commit_graph_lite(graph))
if (verify_commit_graph_lite(graph)) {
free(graph);
return NULL;
}
return graph;
}