提交 17f8d42c 编写于 作者: M Miaoqian Lin 提交者: Zheng Zengkai

drm/amd/display: Fix memory leak in dcn21_clock_source_create

stable inclusion
from stable-v5.10.114
commit 77b922683e9e5b3bb55102182979b04cd13076ad
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5IY1V

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=77b922683e9e5b3bb55102182979b04cd13076ad

--------------------------------

[ Upstream commit 65e54987 ]

When dcn20_clk_src_construct() fails, we need to release clk_src.

Fixes: 6f4e6361 ("drm/amd/display: Add Renoir resource (v2)")
Signed-off-by: NMiaoqian Lin <linmq006@gmail.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
上级 decc41e3
...@@ -1267,6 +1267,7 @@ static struct clock_source *dcn21_clock_source_create( ...@@ -1267,6 +1267,7 @@ static struct clock_source *dcn21_clock_source_create(
return &clk_src->base; return &clk_src->base;
} }
kfree(clk_src);
BREAK_TO_DEBUGGER(); BREAK_TO_DEBUGGER();
return NULL; return NULL;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册