diff options
| author | Sahitya Chandra <sahityajb@gmail.com> | 2026-02-21 16:08:59 +0530 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-02-21 21:26:53 -0800 |
| commit | 7451864bfac0fc7ac829aceecd7f339b80dac732 (patch) | |
| tree | 3309158fb945ac791c88185727784f284c41d0ce /contrib/persistent-https | |
| parent | 67ad42147a7acc2af6074753ebd03d904476118f (diff) | |
| download | git-7451864bfac0fc7ac829aceecd7f339b80dac732.tar.gz git-7451864bfac0fc7ac829aceecd7f339b80dac732.zip | |
pack-redundant: fix memory leak when open_pack_index() fails
In add_pack(), we allocate l.remaining_objects with llist_init() before
calling open_pack_index(). If open_pack_index() fails we return NULL
without freeing the allocated list, leaking the memory.
Fix by calling llist_free(l.remaining_objects) on the error path before
returning.
Signed-off-by: Sahitya Chandra <sahityajb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/persistent-https')
0 files changed, 0 insertions, 0 deletions
