summaryrefslogtreecommitdiff
path: root/builtin/commit-graph.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2023-10-03 16:30:44 -0400
committerJunio C Hamano <gitster@pobox.com>2023-10-03 14:28:24 -0700
commit1d94abfe1eedb3f0a9de74ba59483ef8f10b352c (patch)
treea73a35e31a7abb138bded345b3916c9fb6d6814d /builtin/commit-graph.c
parent991d549f74862d07a38a077f34c0deaf65607c74 (diff)
commit-graph: free graph struct that was not added to chain
When reading the graph chain file, we open (and allocate) each individual slice it mentions and then add them to a linked-list chain. But if adding to the chain fails (e.g., because the base-graph chunk it contains didn't match what we expected), we leave the function without freeing the graph struct that caused the failure, leaking it. We can fix it by calling free_graph_commit(). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit-graph.c')
0 files changed, 0 insertions, 0 deletions