summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--http-walker.c10
-rwxr-xr-xt/t5550-http-fetch-dumb.sh1
2 files changed, 11 insertions, 0 deletions
diff --git a/http-walker.c b/http-walker.c
index 9c1e5c37e6..fb2d86d5e7 100644
--- a/http-walker.c
+++ b/http-walker.c
@@ -579,8 +579,18 @@ static void cleanup(struct walker *walker)
if (data) {
alt = data->alt;
while (alt) {
+ struct packed_git *pack;
+
alt_next = alt->next;
+ pack = alt->packs;
+ while (pack) {
+ struct packed_git *pack_next = pack->next;
+ close_pack(pack);
+ free(pack);
+ pack = pack_next;
+ }
+
free(alt->base);
free(alt);
diff --git a/t/t5550-http-fetch-dumb.sh b/t/t5550-http-fetch-dumb.sh
index ea8e48f627..58189c9f7d 100755
--- a/t/t5550-http-fetch-dumb.sh
+++ b/t/t5550-http-fetch-dumb.sh
@@ -4,6 +4,7 @@ test_description='test dumb fetching over http via static file'
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
+TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh
if test_have_prereq !REFFILES