From: René Scharfe Date: Fri, 24 Sep 2021 06:10:10 +0000 (+0200) Subject: packfile: release bad_objects in close_pack() X-Git-Tag: v2.34.0-rc0~99^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8c6b4332b47792947f29d3abd729b8290add96fd;p=thirdparty%2Fgit.git 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 Signed-off-by: Junio C Hamano --- diff --git a/packfile.c b/packfile.c index ea29f4ba77..8318ce5afd 100644 --- a/packfile.c +++ b/packfile.c @@ -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)