[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220421090313.24864-1-linmq006@gmail.com>
Date: Thu, 21 Apr 2022 17:03:09 +0800
From: Miaoqian Lin <linmq006@...il.com>
To: Harry Wentland <harry.wentland@....com>,
Leo Li <sunpeng.li@....com>,
Rodrigo Siqueira <Rodrigo.Siqueira@....com>,
Alex Deucher <alexander.deucher@....com>,
Christian König <christian.koenig@....com>,
"Pan, Xinhui" <Xinhui.Pan@....com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
Laktyushkin Dmytro <dmytro.laktyushkin@....com>,
Solomon Chiu <solomon.chiu@....com>,
Stylon Wang <stylon.wang@....com>,
Victor Lu <victorchengchi.lu@....com>,
Ilya Bakoulin <Ilya.Bakoulin@....com>,
Melissa Wen <mwen@...lia.com>, Angus Wang <angus.wang@....com>,
Fangzhi Zuo <Jerry.Zuo@....com>,
Isabella Basso <isabbasso@...eup.net>,
Bhawanpreet Lakha <Bhawanpreet.Lakha@....com>,
amd-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org
Cc: linmq006@...il.com
Subject: [PATCH] drm/amd/display: Fix memory leak in dcn21_clock_source_create
When dcn20_clk_src_construct() fails, we need to release clk_src.
Fixes: 6f4e6361c3ff ("drm/amd/display: Add Renoir resource (v2)")
Signed-off-by: Miaoqian Lin <linmq006@...il.com>
---
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c
index 3fe4bfbb98a0..faab59508d82 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c
@@ -997,6 +997,7 @@ static struct clock_source *dcn21_clock_source_create(
return &clk_src->base;
}
+ kfree(clk_src);
BREAK_TO_DEBUGGER();
return NULL;
}
--
2.17.1
Powered by blists - more mailing lists