Commit c6282829 authored by Zheng Yongjun's avatar Zheng Yongjun Committed by sanglipeng
Browse files

ARM: mxs: fix memory leak in mxs_machine_init()

stable inclusion
from stable-v5.10.157
commit 290a71ff721b072356c18be0e9bfa505935463d9
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7MU59

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=290a71ff721b072356c18be0e9bfa505935463d9



--------------------------------

[ Upstream commit f31e3c20 ]

If of_property_read_string() failed, 'soc_dev_attr' should be
freed before return. Otherwise there is a memory leak.

Fixes: 2046338d ("ARM: mxs: Use soc bus infrastructure")
Signed-off-by: default avatarZheng Yongjun <zhengyongjun3@huawei.com>
Reviewed-by: default avatarMarco Felsch <m.felsch@pengutronix.de>
Signed-off-by: default avatarShawn Guo <shawnguo@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent a0fb21ed
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment