summaryrefslogtreecommitdiff
path: root/git.c
diff options
context:
space:
mode:
authorLibravatar Derrick Stolee <dstolee@microsoft.com>2018-10-03 10:12:15 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-10-07 08:25:05 +0900
commitf4dbdfc4d514d4ea558703f5a234652dc68d83b2 (patch)
treed2a849f5ff05e35b8204efea7c82cf9bc3f2e1a5 /git.c
parentgc: fix regression in 7b0f229222 impacting --quiet (diff)
downloadtgif-f4dbdfc4d514d4ea558703f5a234652dc68d83b2.tar.xz
commit-graph: clean up leaked memory during write
The write_commit_graph() method in commit-graph.c leaks some lits and strings during execution. In addition, a list of strings is leaked in write_commit_graph_reachable(). Clean these up so our memory checking is cleaner. Further, if we use a list of pack-files to find the commits, we can leak the packed_git structs after scanning them for commits. Running the following commands demonstrates the leak before and the fix after: * valgrind --leak-check=full ./git commit-graph write --reachable * valgrind --leak-check=full ./git commit-graph write --stdin-packs Signed-off-by: Martin Ă…gren <martin.agren@gmail.com> Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git.c')
0 files changed, 0 insertions, 0 deletions