repack: free existing_cruft array after use
We allocate an array of packed_git pointers so that we can sort the list of cruft packs, but we never free the array, causing a small leak. Note that we don't need to free the packed_git structs themselves; they're owned by the repository object. Signed-off-by: Jeff King <peff@peff.net> Acked-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
3c1e2c2113
commit
c1b754d059
@ -955,6 +955,7 @@ static void collapse_small_cruft_packs(FILE *in, size_t max_size,
|
|||||||
existing->non_kept_packs.items[i].string);
|
existing->non_kept_packs.items[i].string);
|
||||||
|
|
||||||
strbuf_release(&buf);
|
strbuf_release(&buf);
|
||||||
|
free(existing_cruft);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int write_cruft_pack(const struct pack_objects_args *args,
|
static int write_cruft_pack(const struct pack_objects_args *args,
|
||||||
|
Reference in New Issue
Block a user