powerpc/boot: Only free if realloc() succeeds
[ Upstream commit f2d5bcca ] 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 <mpe@ellerman.id.au> Link: https://msgid.link/20240229115149.749264-1-mpe@ellerman.id.au Signed-off-by:
Sasha Levin <sashal@kernel.org>
Loading