]> git.ipfire.org Git - thirdparty/git.git/commit
fetch-pack: fix memory leaks on fetch negotiation
authorPatrick Steinhardt <ps@pks.im>
Thu, 5 Sep 2024 10:08:40 +0000 (12:08 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 5 Sep 2024 15:49:10 +0000 (08:49 -0700)
commit63494913eced2f0993eb431ad236b03e6ee8cac2
tree04e3bc70bddc380863411f45ed84cf64af4715b4
parenta9539a993a2b4dbfb5540aebb02bfcfd5be4c24f
fetch-pack: fix memory leaks on fetch negotiation

We leak both the `nt_object_array` and `negotiator` structures in
`negotiate_using_fetch()`. Plug both of these leaks.

These leaks were exposed by t5516, but fixing them is not sufficient to
make the whole test suite leak free.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fetch-pack.c