diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-05-19 16:45:28 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-05-19 16:45:28 +0900 |
commit | 3c9b393ca8fdb4db53e461a6f506dd10ed6fbc85 (patch) | |
tree | 7986335bfbab708a41a58963463dddebcf9829c3 /commit-graph.c | |
parent | Merge branch 'jk/cocci-batch' (diff) | |
parent | commit-graph: fix memory leak (diff) | |
download | tgif-3c9b393ca8fdb4db53e461a6f506dd10ed6fbc85.tar.xz |
Merge branch 'js/commit-graph-parse-leakfix'
Leakfix.
* js/commit-graph-parse-leakfix:
commit-graph: fix memory leak
Diffstat (limited to 'commit-graph.c')
-rw-r--r-- | commit-graph.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; } |