summaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/utils.py
diff options
context:
space:
mode:
authorXiaoke Wang <xkernel.wang@foxmail.com>2022-04-07 10:37:22 +0300
committerAbel Vesa <abel.vesa@nxp.com>2022-04-12 14:02:02 +0300
commit2759f38b6c9551e4a1184131bc660d6a520a7cf4 (patch)
tree73d9c9d1323dfd4f8b2622e7796761dfdd1dd2bd /scripts/gdb/linux/utils.py
parented713e2bc093239ccd380c2ce8ae9e4162f5c037 (diff)
downloadlinux-2759f38b6c9551e4a1184131bc660d6a520a7cf4.tar.xz
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 <xkernel.wang@foxmail.com> Reviewed-by: Abel Vesa <abel.vesa@nxp.com> Link: https://lore.kernel.org/r/tencent_27FF59903EE6AB5C0D0E6D0A8E7059A59007@qq.com Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions