From: Junio C Hamano Date: Sun, 19 May 2019 07:45:28 +0000 (+0900) Subject: Merge branch 'js/commit-graph-parse-leakfix' X-Git-Tag: v2.22.0-rc1~27 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/3c9b393ca8fdb4db53e461a6f506dd10ed6fbc85?hp=6795fc8afd49ecc0ae57661a8858d6882108cef5 Merge branch 'js/commit-graph-parse-leakfix' Leakfix. * js/commit-graph-parse-leakfix: commit-graph: fix memory leak --- diff --git a/commit-graph.c b/commit-graph.c index 7bcc9bb7e0..7c5e54875f 100644 --- a/commit-graph.c +++ b/commit-graph.c @@ -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; }