Skip to content

Commit

Permalink
drm/amd: fix potential memory leak
Browse files Browse the repository at this point in the history
[ Upstream commit 6160216 ]

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>
  • Loading branch information
Bernard Zhao authored and gregkh committed Oct 21, 2022
1 parent da8f0b8 commit a6e6ab9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c
Original file line number Diff line number Diff line change
Expand Up @@ -1720,6 +1720,7 @@ static struct clock_source *dcn30_clock_source_create(
}

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

Expand Down

0 comments on commit a6e6ab9

Please sign in to comment.