]> 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)
committerShawn Guo <shawnguo@kernel.org>
Sat, 19 Nov 2022 01:40:36 +0000 (09:40 +0800)
commit781590de31e66fae520d37502913aecd9bd1dbb0
treecde20244b51621a0fae65ad75153b42eafb1afb3
parent2d1853537bbb4e5a6d80e4b9a8df2952dc1a226a
ARM: mxs: fix memory leak in mxs_machine_init()

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

Fixes: 1b687fb40739 ("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>
arch/arm/mach-mxs/mach-mxs.c