summaryrefslogtreecommitdiff
path: root/builtin/commit.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2024-09-24 18:11:13 -0400
committerJunio C Hamano <gitster@pobox.com>2024-09-25 10:24:58 -0700
commit9699327945d16f67f8a20a299d63621a3b1d3cd2 (patch)
tree1e5537d06f03069d38da79d27ebb55c666138a51 /builtin/commit.c
parent92e1eb491a9b8d47d8aa9e903354f7749fc85c4e (diff)
http-push: clean up loose request when falling back to packed
In http-push's finish_request(), if we fail a loose object request we may fall back to trying a packed request. But if we do so, we leave the http_loose_object_request in place, leaking it. We can fix this by always cleaning it up. Note that the obj_req pointer here (which we'll set to NULL) is a copy of the request->userData pointer, which will now point to freed memory. But that's OK. We'll either release the parent request struct entirely, or we'll convert it into a packed request, which will overwrite userData itself. This leak is found by t5540, but it's not quite leak-free yet. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
0 files changed, 0 insertions, 0 deletions