diff options
author | Xiaoke Wang <[email protected]> | 2022-04-07 15:37:22 +0800 |
---|---|---|
committer | Abel Vesa <[email protected]> | 2022-04-12 14:02:02 +0300 |
commit | 2759f38b6c9551e4a1184131bc660d6a520a7cf4 (patch) | |
tree | 73d9c9d1323dfd4f8b2622e7796761dfdd1dd2bd /lib/test_fortify/write_overflow-memcpy.c | |
parent | ed713e2bc093239ccd380c2ce8ae9e4162f5c037 (diff) |
clk: imx: scu: fix a potential memory leak in __imx_clk_gpr_scu()
In __imx_clk_gpr_scu(), if imx_scu_clk_is_valid(rsrc_id) fails, then
`clk_node` which is allocated by kzalloc() is not properly released,
which may lead to memory leak.
So this patch added kfree(clk_node) on the above error path before
return ERR_PTR(-EINVAL).
Signed-off-by: Xiaoke Wang <[email protected]>
Reviewed-by: Abel Vesa <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Abel Vesa <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-memcpy.c')
0 files changed, 0 insertions, 0 deletions