Commit a3f22feb authored by Qiheng Lin's avatar Qiheng Lin Committed by Sasha Levin
Browse files

powerpc/pseries: Fix potential memleak in papr_get_attr()



[ Upstream commit cda9c0d5 ]

`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: 3c14b734 ("powerpc/pseries: Interface to represent PAPR firmware attributes")
Signed-off-by: default avatarQiheng Lin <linqiheng@huawei.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20221208133449.16284-1-linqiheng@huawei.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent d2bd30c7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment