[PATCH] clk: imx: scu: Fix memory leak in __imx_clk_gpr_scu()

Peng Fan peng.fan at nxp.com
Mon Dec 11 16:40:24 PST 2023


> Subject: [PATCH] clk: imx: scu: Fix memory leak in __imx_clk_gpr_scu()
> 
> In cases where imx_clk_is_resource_owned() returns false, the code path does
> not handle the failure gracefully, potentially leading to a memory leak. This
> fix ensures proper cleanup by freeing the allocated memory for 'clk_node'
> before returning.
> 
> Signed-off-by: Kuan-Wei Chiu <visitorckw at gmail.com>

Reviewed-by: Peng Fan <peng.fan at nxp.com>



More information about the linux-arm-kernel mailing list