drm/amd: fix potential memory leak
Subsystems (3)
PATCH 1/1 drm/amd: fix potential memory leak
This patch fix potential memory leak (clk_src) when function run into last return NULL.
Signed-off-by Bernard Zhao <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c +1 -0
@@ -1643,6 +1643,7 @@ static struct clock_source *dcn31_clock_source_create( }BREAK_TO_DEBUGGER (); +kfree (clk_src);return NULL ; }
Signature · 1 line
2.33.1
Alex Deucher
AppliedApplied. Thanks!
Alex
Quoted 23 lines · Bernard Zhao
This patch fix potential memory leak (
clk_src) when function run into last return NULL.Signed-off-by Bernard Zhao <[email protected]>--- drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c +1
-1@@ -1643,6 +1643,7 @@ static struct clock_source *dcn31_clock_source_create( }BREAK_TO_DEBUGGER (); +kfree (clk_src);return NULL ; } --2.33.1