Commit cabe144b authored by Navid Emamdoost's avatar Navid Emamdoost Committed by Alex Deucher

drm/amd/display: memory leak

In dcn*_clock_source_create when dcn20_clk_src_construct fails allocated
clk_src needs release.
Signed-off-by: default avatarNavid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 2e0db9de
...@@ -668,6 +668,7 @@ struct clock_source *dce100_clock_source_create( ...@@ -668,6 +668,7 @@ struct clock_source *dce100_clock_source_create(
return &clk_src->base; return &clk_src->base;
} }
kfree(clk_src);
BREAK_TO_DEBUGGER(); BREAK_TO_DEBUGGER();
return NULL; return NULL;
} }
......
...@@ -714,6 +714,7 @@ struct clock_source *dce110_clock_source_create( ...@@ -714,6 +714,7 @@ struct clock_source *dce110_clock_source_create(
return &clk_src->base; return &clk_src->base;
} }
kfree(clk_src);
BREAK_TO_DEBUGGER(); BREAK_TO_DEBUGGER();
return NULL; return NULL;
} }
......
...@@ -687,6 +687,7 @@ struct clock_source *dce112_clock_source_create( ...@@ -687,6 +687,7 @@ struct clock_source *dce112_clock_source_create(
return &clk_src->base; return &clk_src->base;
} }
kfree(clk_src);
BREAK_TO_DEBUGGER(); BREAK_TO_DEBUGGER();
return NULL; return NULL;
} }
......
...@@ -500,6 +500,7 @@ static struct clock_source *dce120_clock_source_create( ...@@ -500,6 +500,7 @@ static struct clock_source *dce120_clock_source_create(
return &clk_src->base; return &clk_src->base;
} }
kfree(clk_src);
BREAK_TO_DEBUGGER(); BREAK_TO_DEBUGGER();
return NULL; return NULL;
} }
......
...@@ -701,6 +701,7 @@ struct clock_source *dce80_clock_source_create( ...@@ -701,6 +701,7 @@ struct clock_source *dce80_clock_source_create(
return &clk_src->base; return &clk_src->base;
} }
kfree(clk_src);
BREAK_TO_DEBUGGER(); BREAK_TO_DEBUGGER();
return NULL; return NULL;
} }
......
...@@ -786,6 +786,7 @@ struct clock_source *dcn10_clock_source_create( ...@@ -786,6 +786,7 @@ struct clock_source *dcn10_clock_source_create(
return &clk_src->base; return &clk_src->base;
} }
kfree(clk_src);
BREAK_TO_DEBUGGER(); BREAK_TO_DEBUGGER();
return NULL; return NULL;
} }
......
...@@ -1077,6 +1077,7 @@ struct clock_source *dcn20_clock_source_create( ...@@ -1077,6 +1077,7 @@ struct clock_source *dcn20_clock_source_create(
return &clk_src->base; return &clk_src->base;
} }
kfree(clk_src);
BREAK_TO_DEBUGGER(); BREAK_TO_DEBUGGER();
return NULL; return NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment