On Wed, Dec 16, 2020 at 09:40:30PM +0200, Andy Shevchenko wrote:
> On Wed, Dec 16, 2020 at 8:05 PM Andy Shevchenko
> wrote:
...
> It seems more patches will come. However, this one, since it is a fix,
> can be applied disregarding that fact. Therefore please skip the rest
> of the series for now
On Wed, Dec 16, 2020 at 8:05 PM Andy Shevchenko
wrote:
>
> It's realloc() 101 to avoid `foo = realloc(foo, ...);` call
> due to getting a memory leak.
>
> Actually it's not clear why realloc() has been used here.
> If we shrink the array, the memcpy() overwrites it anyway
> with the contents of a
It's realloc() 101 to avoid `foo = realloc(foo, ...);` call
due to getting a memory leak.
Actually it's not clear why realloc() has been used here.
If we shrink the array, the memcpy() overwrites it anyway
with the contents of a new array. If it becomes bigger,
same story.
Drop useless realloc()
3 matches
Mail list logo