diff options
| author | LorenzoPegorari <lorenzo.pegorari2002@gmail.com> | 2026-06-01 15:52:12 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-06-02 07:57:52 +0900 |
| commit | 18decad922884a69ea39c0332f7a94ce82cf99cc (patch) | |
| tree | ba9cc24561ad33fdcd89ea13d8da6226dead9659 /t/t4013/diff.diff_initial..side | |
| parent | 96ee7f1650e6096561599f069d18c052412d7506 (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 't/t4013/diff.diff_initial..side')
0 files changed, 0 insertions, 0 deletions
