Re: [PATCH] powerpc/pseries: Fix potential memleak in papr_get_attr()

2024-03-13 Thread Michael Ellerman
On Thu, 08 Dec 2022 21:34:49 +0800, Qiheng Lin wrote: > `buf` is allocated in papr_get_attr(), and krealloc() of `buf` > could fail. We need to free the original `buf` in the case of failure. > > Applied to powerpc/next. [1/1] powerpc/pseries: Fix potential memleak in papr_get_attr() http

[PATCH] powerpc/pseries: Fix potential memleak in papr_get_attr()

2022-12-08 Thread Qiheng Lin
`buf` is allocated in papr_get_attr(), and krealloc() of `buf` could fail. We need to free the original `buf` in the case of failure. Fixes: 3c14b73454cf ("powerpc/pseries: Interface to represent PAPR firmware attributes") Signed-off-by: Qiheng Lin --- arch/powerpc/platforms/pseries/papr_platfo