From f3c23db2d7e764b247f7d76a8d0ba180811e9525 Mon Sep 17 00:00:00 2001 From: Jonathan Tan Date: Thu, 7 Jun 2018 12:04:14 -0700 Subject: pack-bitmap: add free function Add a function to free struct bitmap_index instances, and use it where needed (except when rebuild_existing_bitmaps() is used, since it creates references to the bitmaps within the struct bitmap_index passed to it). Note that the hashes field in struct bitmap_index is not freed because it points to another field within the same struct. The documentation for that field has been updated to clarify that. Signed-off-by: Jonathan Tan Signed-off-by: Junio C Hamano --- pack-bitmap.h | 1 + 1 file changed, 1 insertion(+) (limited to 'pack-bitmap.h') diff --git a/pack-bitmap.h b/pack-bitmap.h index 19f70043a8..4555907dee 100644 --- a/pack-bitmap.h +++ b/pack-bitmap.h @@ -48,6 +48,7 @@ int reuse_partial_packfile_from_bitmap(struct bitmap_index *, uint32_t *entries, off_t *up_to); int rebuild_existing_bitmaps(struct bitmap_index *, struct packing_data *mapping, khash_sha1 *reused_bitmaps, int show_progress); +void free_bitmap_index(struct bitmap_index *); void bitmap_writer_show_progress(int show); void bitmap_writer_set_checksum(unsigned char *sha1); -- cgit v1.2.3