summaryrefslogtreecommitdiff
path: root/builtin/annotate.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2024-09-24 18:10:38 -0400
committerJunio C Hamano <gitster@pobox.com>2024-09-25 10:24:57 -0700
commit92e1eb491a9b8d47d8aa9e903354f7749fc85c4e (patch)
tree6cd2747893102a3e2445efa97e841243b49a2826 /builtin/annotate.c
parent3245a2ade5ee0ff3e5fad7bd96ad0a630c590e82 (diff)
http-push: clean up objects list
In http-push's get_delta(), we generate a list of pending objects by recursively processing trees and blobs, adding them to a linked list. And then we iterate over the list, adding a new request for each element. But since we iterate using the list head pointer, at the end it is NULL and all of the actual list structs have been leaked. We can fix this either by using a separate iterator and then calling object_list_free(), or by just freeing as we go. I picked the latter, just because it means we continue to shrink the list as we go, though I'm not sure it matters in practice (we call add_send_request() in the loop, but I don't think it ever looks at the global objects list itself). This fixes several leaks noticed in t5540. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/annotate.c')
0 files changed, 0 insertions, 0 deletions