forked from Minki/linux
drm/amd/display: memory leak
In dcn*_clock_source_create when dcn20_clk_src_construct fails allocated clk_src needs release. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
57be09c6e8
commit
055e547478
@ -668,6 +668,7 @@ struct clock_source *dce100_clock_source_create(
|
||||
return &clk_src->base;
|
||||
}
|
||||
|
||||
kfree(clk_src);
|
||||
BREAK_TO_DEBUGGER();
|
||||
return NULL;
|
||||
}
|
||||
|
@ -714,6 +714,7 @@ struct clock_source *dce110_clock_source_create(
|
||||
return &clk_src->base;
|
||||
}
|
||||
|
||||
kfree(clk_src);
|
||||
BREAK_TO_DEBUGGER();
|
||||
return NULL;
|
||||
}
|
||||
|
@ -687,6 +687,7 @@ struct clock_source *dce112_clock_source_create(
|
||||
return &clk_src->base;
|
||||
}
|
||||
|
||||
kfree(clk_src);
|
||||
BREAK_TO_DEBUGGER();
|
||||
return NULL;
|
||||
}
|
||||
|
@ -500,6 +500,7 @@ static struct clock_source *dce120_clock_source_create(
|
||||
return &clk_src->base;
|
||||
}
|
||||
|
||||
kfree(clk_src);
|
||||
BREAK_TO_DEBUGGER();
|
||||
return NULL;
|
||||
}
|
||||
|
@ -701,6 +701,7 @@ struct clock_source *dce80_clock_source_create(
|
||||
return &clk_src->base;
|
||||
}
|
||||
|
||||
kfree(clk_src);
|
||||
BREAK_TO_DEBUGGER();
|
||||
return NULL;
|
||||
}
|
||||
|
@ -786,6 +786,7 @@ struct clock_source *dcn10_clock_source_create(
|
||||
return &clk_src->base;
|
||||
}
|
||||
|
||||
kfree(clk_src);
|
||||
BREAK_TO_DEBUGGER();
|
||||
return NULL;
|
||||
}
|
||||
|
@ -1077,6 +1077,7 @@ struct clock_source *dcn20_clock_source_create(
|
||||
return &clk_src->base;
|
||||
}
|
||||
|
||||
kfree(clk_src);
|
||||
BREAK_TO_DEBUGGER();
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user