Skip to content

Commit 65e5498

Browse files
Yuuoniyalexdeucher
authored andcommitted
drm/amd/display: Fix memory leak in dcn21_clock_source_create
When dcn20_clk_src_construct() fails, we need to release clk_src. Fixes: 6f4e636 ("drm/amd/display: Add Renoir resource (v2)") Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent f95af4a commit 65e5498

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -997,6 +997,7 @@ static struct clock_source *dcn21_clock_source_create(
997997
return &clk_src->base;
998998
}
999999

1000+
kfree(clk_src);
10001001
BREAK_TO_DEBUGGER();
10011002
return NULL;
10021003
}

0 commit comments

Comments
 (0)