Re: [PATCH 09/11] pack-bitmap.c: more aggressively free in free_bitmap_index()
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Oct 21, 2021, 05:10 UTC
- Message-ID
- <CAPig+cToh_8x+72-g6cdvt559N4GqKwfmBDE9BxTpkXOFrRbsA@mail.gmail.com>
- In-Reply-To
- <e65ac7deb5973b8209e8d94ad9140e005e22c44e.1634787555.git.me@ttaylorr.com>
On Wed, Oct 20, 2021 at 11:40 PM Taylor Blau <me@ttaylorr.com> wrote:
Show 8 quoted lines
> The function free_bitmap_index() is somewhat lax in what it frees. There > are two notable examples: > > - While it does call kh_destroy_oid_map on the "bitmaps" map (which > maps) commit OIDs to their corresponding bitmaps, the bitmaps > themselves are not freed. Note here that we recycle already-freed > ewah_bitmaps into a pool, but these are handled correctly by > ewah_pool_free().
The parentheses placement seems off; it's not clear what the intent is. Perhaps either move the closing parenthesis to just before the comma or drop them altogether.
Show 6 quoted lines
> - We never bother to free the extended index's "positions" map, which > we always allocate in load_bitmap(). > > Fix both of these. > > Signed-off-by: Taylor Blau <me@ttaylorr.com>