Skip to content

Commit b2ee9fa

Browse files
Clayton Kingalexdeucher
authored andcommitted
drm/amd/display: Free memory allocation
[WHY] Free memory to avoid memory leak Reviewed-by: Joshua Aberback <[email protected]> Signed-off-by: Clayton King <[email protected]> Signed-off-by: Ivan Lipski <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]> (cherry picked from commit fa699ac) Cc: [email protected]
1 parent 347e9f5 commit b2ee9fa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/gpu/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1565,7 +1565,7 @@ struct clk_mgr_internal *dcn401_clk_mgr_construct(
15651565
clk_mgr->base.bw_params = kzalloc(sizeof(*clk_mgr->base.bw_params), GFP_KERNEL);
15661566
if (!clk_mgr->base.bw_params) {
15671567
BREAK_TO_DEBUGGER();
1568-
kfree(clk_mgr);
1568+
kfree(clk_mgr401);
15691569
return NULL;
15701570
}
15711571

@@ -1576,6 +1576,7 @@ struct clk_mgr_internal *dcn401_clk_mgr_construct(
15761576
if (!clk_mgr->wm_range_table) {
15771577
BREAK_TO_DEBUGGER();
15781578
kfree(clk_mgr->base.bw_params);
1579+
kfree(clk_mgr401);
15791580
return NULL;
15801581
}
15811582

0 commit comments

Comments
 (0)