summaryrefslogtreecommitdiff
path: root/commit-graph.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2019-05-19 16:45:28 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-05-19 16:45:28 +0900
commit3c9b393ca8fdb4db53e461a6f506dd10ed6fbc85 (patch)
tree7986335bfbab708a41a58963463dddebcf9829c3 /commit-graph.c
parentMerge branch 'jk/cocci-batch' (diff)
parentcommit-graph: fix memory leak (diff)
downloadtgif-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.c4
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;
}