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

@ -853,6 +853,7 @@ static int write_midx_bitmap(const char *midx_name,
cleanup:
free(index);
free(bitmap_name);
bitmap_writer_free(&writer);
trace2_region_leave("midx", "write_midx_bitmap", the_repository);