1
0
mirror of https://github.com/git/git synced 2024-07-02 15:48:44 +00:00

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>
This commit is contained in:
René Scharfe 2021-09-24 08:10:10 +02:00 committed by Junio C Hamano
parent 48bf2fa8ba
commit 8c6b4332b4

View File

@ -339,6 +339,7 @@ void close_pack(struct packed_git *p)
close_pack_fd(p);
close_pack_index(p);
close_pack_revindex(p);
oidset_clear(&p->bad_objects);
}
void close_object_store(struct raw_object_store *o)