]> git.ipfire.org Git - thirdparty/git.git/commit
submodule: fix leaking seen submodule names
authorPatrick Steinhardt <ps@pks.im>
Thu, 8 Aug 2024 07:35:56 +0000 (09:35 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 8 Aug 2024 16:22:21 +0000 (09:22 -0700)
commitfa0f27a19d4e2606ec24d9d4aed4f6c8df986370
tree0469ce4a2235a21b672b5413b77b44866b43208c
parent1a7e5efdb06a7e3087bf9068220b011f006db43f
submodule: fix leaking seen submodule names

We keep track of submodules we have already seen via a string map such
that we don't process the same submodule twice. We never free that map
though, causing a memory leak.

Fix this leak by clearing the map.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
submodule.c
t/t5572-pull-submodule.sh
t/t7418-submodule-sparse-gitmodules.sh