]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: mxs: fix memory leak in mxs_machine_init()
authorZheng Yongjun <zhengyongjun3@huawei.com>
Thu, 17 Nov 2022 06:20:11 +0000 (06:20 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Dec 2022 10:22:58 +0000 (11:22 +0100)
commit4767001585919adff4625c2006ef1a2ad66e97aa
tree26ec61de70adac9ccf69df1a38c006c3c5381570
parent58dfcfdc9ee581c9c8e6427f247078bf5aa173b8
ARM: mxs: fix memory leak in mxs_machine_init()

[ Upstream commit a380d561af1449a423f73df640102ac37ed78831 ]

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

Fixes: 2ccb087e1c28 ("ARM: mxs: Use soc bus infrastructure")
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arm/mach-mxs/mach-mxs.c