]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
powerpc/pseries: fix memory leak on krealloc failure in papr_init
authorThorsten Blum <thorsten.blum@linux.dev>
Sun, 14 Jun 2026 14:23:56 +0000 (16:23 +0200)
committerMadhavan Srinivasan <maddy@linux.ibm.com>
Wed, 15 Jul 2026 02:34:13 +0000 (08:04 +0530)
commitbd83c98b988d2c560531084e296dbfb530aff829
treeea7eae24d2c0e90c3d69dd788657ed41fef98181
parentd610d3ab18197d87618da11ec5fe8b3cebf32208
powerpc/pseries: fix memory leak on krealloc failure in papr_init

When krealloc() fails, free the original esi_buf before returning to
avoid a memory leak.

Fixes: 3c14b73454cf ("powerpc/pseries: Interface to represent PAPR firmware attributes")
Cc: stable@vger.kernel.org
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20260614142356.658212-2-thorsten.blum@linux.dev
arch/powerpc/platforms/pseries/papr_platform_attributes.c