summaryrefslogtreecommitdiff
path: root/commit.h
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2024-09-24 18:08:49 -0400
committerJunio C Hamano <gitster@pobox.com>2024-09-25 10:24:57 -0700
commit94c62857808bdd6b5b061284eb9dfd13204bd11a (patch)
treeac11539cc2193274a7cf590ce7e8997bce8a5b1e /commit.h
parent7d3c71ddbf346bb5182d1cbb4610b9b575b34491 (diff)
http-push: free transfer_request strbuf
When we issue a PUT, we initialize and fill a strbuf embedded in the transfer_request struct. But we never release this buffer, causing a leak. We can fix this by adding a strbuf_release() call to release_request(). If we stopped there, then non-PUT requests would try to release a zero-initialized strbuf. This works OK in practice, but we should try to follow the strbuf API more closely. So instead, we'll always initialize the strbuf when we create the transfer_request struct. That in turn means switching the strbuf_init() call in start_put() to a simple strbuf_grow(). This leak is triggered in t5540. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.h')
0 files changed, 0 insertions, 0 deletions