pack-bitmap: introduce bitmap_writer_free()

Now that there is clearer memory ownership around the bitmap_writer
structure, introduce a bitmap_writer_free() function that callers may
use to free any memory associated with their instance of the
bitmap_writer structure.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Taylor Blau
2024-05-14 15:57:06 -04:00
committed by Junio C Hamano
parent f25e1f2a4d
commit 85f360fee5
4 changed files with 27 additions and 1 deletions

View File

@@ -139,6 +139,7 @@ void bitmap_writer_finish(struct bitmap_writer *writer,
uint32_t index_nr,
const char *filename,
uint16_t options);
void bitmap_writer_free(struct bitmap_writer *writer);
char *midx_bitmap_filename(struct multi_pack_index *midx);
char *pack_bitmap_filename(struct packed_git *p);