THIS IS A TEST INSTANCE ONLY! REPOSITORIES CAN BE DELETED AT ANY TIME!

瀏覽代碼

commit-graph: fix memory leak

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 <steadmon@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
tags/v2.22.0-rc1
Josh Steadmon Junio C Hamano 8 月之前
父節點
當前提交
98552f252a
共有 1 個檔案被更改,包括 3 行新增1 行删除
  1. +3
    -1
      commit-graph.c

+ 3
- 1
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;
}


Loading…
取消
儲存