mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-10-12 06:01:58 +00:00
powerpc/powernv: Add a null pointer check to scom_debug_init_one()
[ Upstream commit9a260f2dd8] kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Add a null pointer check, and release 'ent' to avoid memory leaks. Fixes:bfd2f0d49a("powerpc/powernv: Get rid of old scom_controller abstraction") Signed-off-by: Kunwu Chan <chentao@kylinos.cn> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20231208085937.107210-1-chentao@kylinos.cn Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
3bbe74e896
commit
a9c05cbb66
1 changed files with 5 additions and 0 deletions
Loading…
Add table
Add a link
Reference in a new issue