Skip to content

Commit

Permalink
drm/amd/display: Fix memory leak in dcn21_clock_source_create
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yuuoniy authored and alexdeucher committed Apr 27, 2022
1 parent f95af4a commit 65e5498
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c
Original file line number Diff line number Diff line change
Expand Up @@ -997,6 +997,7 @@ static struct clock_source *dcn21_clock_source_create(
return &clk_src->base;
}

kfree(clk_src);
BREAK_TO_DEBUGGER();
return NULL;
}
Expand Down

0 comments on commit 65e5498

Please sign in to comment.