]> git.ipfire.org Git - thirdparty/git.git/commit
remote: fix leaking push reports
authorPatrick Steinhardt <ps@pks.im>
Mon, 30 Sep 2024 09:14:21 +0000 (11:14 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 30 Sep 2024 18:23:08 +0000 (11:23 -0700)
commita6c30623d77b5fe759d5d9bedc33957ddaff1b4d
tree8a06803ec667d75651e7de84d0f9f0665ba16c54
parent12f0fb953891940598486bdbe8edd28b05b38278
remote: fix leaking push reports

The push reports that report failures to the user when pushing a
reference leak in several places. Plug these leaks by introducing a new
function `ref_push_report_free()` that frees the list of reports and
call it as required. While at it, fix a trivially leaking error string
in the vicinity.

These leaks get hit in t5411, but plugging them does not make the whole
test suite pass.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/receive-pack.c
remote.c
remote.h