summaryrefslogtreecommitdiff
path: root/t/t7418-submodule-sparse-gitmodules.sh
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-08-08 09:35:56 +0200
committerJunio C Hamano <gitster@pobox.com>2024-08-08 09:22:21 -0700
commitfa0f27a19d4e2606ec24d9d4aed4f6c8df986370 (patch)
tree0469ce4a2235a21b672b5413b77b44866b43208c /t/t7418-submodule-sparse-gitmodules.sh
parent1a7e5efdb06a7e3087bf9068220b011f006db43f (diff)
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>
Diffstat (limited to 't/t7418-submodule-sparse-gitmodules.sh')
-rwxr-xr-xt/t7418-submodule-sparse-gitmodules.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/t/t7418-submodule-sparse-gitmodules.sh b/t/t7418-submodule-sparse-gitmodules.sh
index dde11ecce8..e1d9bf2ee3 100755
--- a/t/t7418-submodule-sparse-gitmodules.sh
+++ b/t/t7418-submodule-sparse-gitmodules.sh
@@ -15,6 +15,7 @@ also by committing .gitmodules and then just removing it from the filesystem.
GIT_TEST_FATAL_REGISTER_SUBMODULE_ODB=1
export GIT_TEST_FATAL_REGISTER_SUBMODULE_ODB
+TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh
test_expect_success 'setup' '