Re: [PATCH] powerpc/boot: Only free if realloc() succeeds

2024-03-13 Thread Michael Ellerman
On Thu, 29 Feb 2024 22:51:49 +1100, Michael Ellerman wrote: > simple_realloc() frees the original buffer (ptr) even if the > reallocation failed. > > Fix it to behave like standard realloc() and only free the original > buffer if the reallocation succeeded. > > > [...] Applied to powerpc/next.

[PATCH] powerpc/boot: Only free if realloc() succeeds

2024-02-29 Thread Michael Ellerman
simple_realloc() frees the original buffer (ptr) even if the reallocation failed. Fix it to behave like standard realloc() and only free the original buffer if the reallocation succeeded. Signed-off-by: Michael Ellerman --- arch/powerpc/boot/simple_alloc.c | 5 +++-- 1 file changed, 3 insertion