Messages in this thread Patch in this message | | | From | Greg Kroah-Hartman <> | Subject | [PATCH 6.0 738/862] drm/amd: fix potential memory leak | Date | Wed, 19 Oct 2022 10:33:45 +0200 |
| |
From: Bernard Zhao <bernard@vivo.com>
[ Upstream commit 6160216fd2c97107e8a9ab39863b056d677fcd85 ]
This patch fix potential memory leak (clk_src) when function run into last return NULL.
s/free/kfree/ - Alex
Signed-off-by: Bernard Zhao <bernard@vivo.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Sasha Levin <sashal@kernel.org> --- drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c b/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c index 3cd7c91655c5..6d721fadcbee 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c @@ -1720,6 +1720,7 @@ static struct clock_source *dcn30_clock_source_create( } BREAK_TO_DEBUGGER(); + kfree(clk_src); return NULL; } -- 2.35.1
| |