Re: [PATCH] devres: zero the memory in devm_krealloc() if needed

From: Andy Shevchenko
Date: Thu Oct 29 2020 - 16:05:38 EST


On Mon, Oct 26, 2020 at 01:27:28PM +0100, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx>
>
> If we're returning the same pointer (when new size is smaller or equal
> to the old size) we need to check if the user wants the memory zeroed
> and memset() it manually if so.

Any use case? Because to me it sounds contradictory to the whole idea of [k]realloc().

--
With Best Regards,
Andy Shevchenko