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>
René Scharfe committed
Sep 24, 2021 at 08:10 UTC
8c6b4332b47792947f29d3abd729b8290add96fd
1 file changed
+1
packfile.c
+1
@@ -339,6 +339,7 @@ void close_pack(struct packed_git *p)
339
close_pack_fd(p);
340
close_pack_index(p);
341
close_pack_revindex(p);
342
+ oidset_clear(&p->bad_objects);
343
}
344
345
void close_object_store(struct raw_object_store *o)