diff options
author | Kuan-Wei Chiu <visitorckw@gmail.com> | 2023-12-10 20:19:07 +0300 |
---|---|---|
committer | Abel Vesa <abel.vesa@linaro.org> | 2023-12-20 12:32:18 +0300 |
commit | 21c0efbcb45cf94724d17b040ebc03fcd4a81f22 (patch) | |
tree | 8dc6f4c3c1bf8c2570af5d6e337198826bc8589a /drivers/clk/imx/clk-imx8qxp.c | |
parent | 144f1b70ea9ebebd21390bfcc78ba3192f12b0c1 (diff) | |
download | linux-21c0efbcb45cf94724d17b040ebc03fcd4a81f22.tar.xz |
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@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/all/20231210171907.3410922-1-visitorckw@gmail.com/
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Diffstat (limited to 'drivers/clk/imx/clk-imx8qxp.c')
0 files changed, 0 insertions, 0 deletions