summaryrefslogtreecommitdiff
path: root/contrib/persistent-https
diff options
context:
space:
mode:
authorLorenzoPegorari <lorenzo.pegorari2002@gmail.com>2026-06-01 15:52:12 +0200
committerJunio C Hamano <gitster@pobox.com>2026-06-02 07:57:52 +0900
commit18decad922884a69ea39c0332f7a94ce82cf99cc (patch)
treeba9cc24561ad33fdcd89ea13d8da6226dead9659 /contrib/persistent-https
parent96ee7f1650e6096561599f069d18c052412d7506 (diff)
http: fix memory leak in fetch_and_setup_pack_index()
Inside the function `fetch_and_setup_pack_index()`, when the pack obtained using `parse_pack_index()` fails to be verified by `verify_pack_index()`, the function returns without closing and freeing said pack. Fix this by calling `close_pack_index()` to munmap the index file for the leaking pack (which might have been mmapped by `fetch_pack_index()` or `verify_pack_index()`), and then free it, when the verification fails. Signed-off-by: LorenzoPegorari <lorenzo.pegorari2002@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/persistent-https')
0 files changed, 0 insertions, 0 deletions