packfile: release bad_objects in close_pack()
commit8c6b4332b47792947f29d3abd729b8290add96fd
authorRené Scharfe <l.s.r@web.de>
Fri, 24 Sep 2021 06:10:10 +0000 (24 08:10 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 24 Sep 2021 16:22:46 +0000 (24 09:22 -0700)
treec06eb98d09562a6f55249f0bcc318f4615f69268
parent48bf2fa8bad054d66bd79c6ba903c89c704201f7
packfile: release bad_objects in close_pack()

Unusable entries of a damaged pack file are recorded in the oidset
bad_objects.  Release it when we're done with the pack.

This doesn't affect intact packs because an empty oidset requires
no allocation.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
packfile.c