]> git.baikalelectronics.ru Git - kernel.git/commit
firmware: imx: scu: Fix possible memory leak in imx_scu_probe()
authorWei Yongjun <weiyongjun1@huawei.com>
Wed, 6 May 2020 05:14:10 +0000 (05:14 +0000)
committerShawn Guo <shawnguo@kernel.org>
Wed, 20 May 2020 03:33:08 +0000 (11:33 +0800)
commit47edb42fa3ecfa45bffc2e8f05fd4ffe76317954
treeba65ea50f908f2700e3e4cb363b7f789ed10ad83
parent2a9ff595cc089b568179f2220906e57aa7afd22f
firmware: imx: scu: Fix possible memory leak in imx_scu_probe()

'chan_name' is malloced in imx_scu_probe() and should be freed
before leaving from the error handling cases, otherwise it will
cause memory leak.

Fixes: 8f93bc4ec92d ("firmware: imx: add SCU firmware driver support")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
drivers/firmware/imx/imx-scu.c