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

From: Peng Fan
Date: Mon Dec 11 2023 - 19:40:31 EST


> 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@xxxxxxxxx>

Reviewed-by: Peng Fan <peng.fan@xxxxxxx>