From fa0f27a19d4e2606ec24d9d4aed4f6c8df986370 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Thu, 8 Aug 2024 09:35:56 +0200 Subject: 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 Signed-off-by: Junio C Hamano --- t/t7418-submodule-sparse-gitmodules.sh | 1 + 1 file changed, 1 insertion(+) (limited to 't/t7418-submodule-sparse-gitmodules.sh') 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' ' -- cgit v1.3