Message ID | 2b9fba8d-be63-4145-9d25-a2151e422cfa@web.de (mailing list archive) |
---|---|
Headers | show |
Series | reftable: fix realloc error handling | expand |
On Wed, Dec 25, 2024 at 07:33:07PM +0100, René Scharfe wrote: > The current handling of reallocation errors leaks the original > allocation in most cases and corrupts the capacity variable. Fix > that in REFTABLE_ALLOC_GROW and by providing a new macro > REFTABLE_ALLOC_GROW_OR_NULL -- solve this somewhat tricky issue > centrally, with minimal impact to calling code. > > And the last two patches add error handling to the remaining > places that still lack it. Thanks a lot for working on this! Patrick
Patrick Steinhardt <ps@pks.im> writes: > On Wed, Dec 25, 2024 at 07:33:07PM +0100, René Scharfe wrote: >> The current handling of reallocation errors leaks the original >> allocation in most cases and corrupts the capacity variable. Fix >> that in REFTABLE_ALLOC_GROW and by providing a new macro >> REFTABLE_ALLOC_GROW_OR_NULL -- solve this somewhat tricky issue >> centrally, with minimal impact to calling code. >> >> And the last two patches add error handling to the remaining >> places that still lack it. > > Thanks a lot for working on this! And thank you for reviewing.