]> git.99rst.org Git - git.git/commit
pack-objects: free packing_data in more places
authorTaylor Blau <redacted>
Thu, 14 Dec 2023 22:23:39 +0000 (17:23 -0500)
committerJunio C Hamano <redacted>
Thu, 14 Dec 2023 22:38:07 +0000 (14:38 -0800)
commit66f0c71073ee5fe1c9d12d2952305a4793d7b43f
tree240dbb9ba6246592470e7d8d78a35dd24319ad27
parent1a87c842ece327d03d08096395969aca5e0a6996
pack-objects: free packing_data in more places

The pack-objects internals use a packing_data struct to track what
objects are part of the pack(s) being formed.

Since these structures contain allocated fields, failing to
appropriately free() them results in a leak. Plug that leak by
introducing a clear_packing_data() function, and call it in the
appropriate spots.

This is a fairly straightforward leak to plug, since none of the callers
expect to read any values or have any references to parts of the address
space being freed.

Signed-off-by: Taylor Blau <redacted>
Signed-off-by: Junio C Hamano <redacted>
builtin/pack-objects.c
midx.c
pack-objects.c
pack-objects.h
git clone https://git.99rst.org/PROJECT