[PATCH] packfile: release bad_objects in close_pack()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
---
 packfile.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/packfile.c b/packfile.c
index 0e92bd7bd2..89402cfc69 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)
--
2.33.0




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux