http: stop leaking buffer in http_get_info_packs()

We use http_get_strbuf() to fetch the remote info/packs content into a
strbuf, but never free it, causing a leak. There's no need to hold onto
it, as we've already parsed it completely.

This lets us mark t5619 as leak-free.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King
2024-09-24 18:02:27 -04:00
committed by Junio C Hamano
parent 8bdb84ebbb
commit 75f4acc981
2 changed files with 2 additions and 0 deletions

1
http.c
View File

@@ -2475,6 +2475,7 @@ int http_get_info_packs(const char *base_url, struct packed_git **packs_head)
cleanup:
free(url);
strbuf_release(&buf);
return ret;
}