Re: [PATCH v4 1/2] pack-bitmap: fix memory leak if load_bitmap() failed
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 29, 2025, 15:33 UTC
- Message-ID
- <xmqqjz5zmnxy.fsf@gitster.g>
- In-Reply-To
- <b6b3a83a22486d0c104c494d1950fdaa2f2a658c.1748140983.git.gitgitgadget@gmail.com>
"Taylor Blau via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 11 quoted lines
> From: Taylor Blau <me@ttaylorr.com> > > After going through the "failed" label, load_bitmap() will return -1, > and its caller (either prepare_bitmap_walk() or prepare_bitmap_git()) > will then call free_bitmap_index(). > ... > The solution is to remove the error handling code in load_bitmap(), because > its caller will always call free_bitmap_index() in case of an error. > > Signed-off-by: Taylor Blau <me@ttaylorr.com> > ---
As this is Lidong relaying <aCOFqYdnPp1Lne4Y@nand.local> that Taylor sent to the list, shouldn't Lidong's sign-off be after Taylor's?