git.99rst.org
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
83232e3
)
commit-graph: fix memory leak
author
Josh Steadmon
<redacted>
Mon, 6 May 2019 21:36:58 +0000
(14:36 -0700)
committer
Junio C Hamano
<redacted>
Tue, 7 May 2019 04:49:28 +0000
(13:49 +0900)
Free the commit graph when verify_commit_graph_lite() reports an error.
Credit to OSS-Fuzz for finding this leak.
Signed-off-by: Josh Steadmon <redacted>
Signed-off-by: Junio C Hamano <redacted>
commit-graph.c
patch
|
blob
|
history
diff --git
a/commit-graph.c
b/commit-graph.c
index 66865acbd7489df4f85ee2454fe05a9b346e7aa7..4bce70d35c9baaa5504c7a15d8208d7ffc185df8 100644
(file)
--- 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;
}
git clone https://git.99rst.org/PROJECT