shallow: fix memory leak when registering shallow roots
commit568cc818cc26955eb0b94084d3068caabab1edd7
authorPatrick Steinhardt <ps@pks.im>
Mon, 6 Nov 2023 10:45:57 +0000 (6 11:45 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 6 Nov 2023 23:51:41 +0000 (7 08:51 +0900)
tree31bb0211188367332ee7afbd273779b25d72cf20
parent40e9136ff641682e2ef739a3dbce03047ed5426f
shallow: fix memory leak when registering shallow roots

When registering shallow roots, we unset the list of parents of the
to-be-registered commit if it's already been parsed. This causes us to
leak memory though because we never free this list. Fix this.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
shallow.c
t/t5311-pack-bitmaps-shallow.sh
t/t5530-upload-pack-error.sh