Message ID | 20200429131341.4697-2-t-kristo@ti.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
Series | clk: ti: couple of fixes towards 5.8 | expand |
Quoting Tero Kristo (2020-04-29 06:13:39) > The parent_names is never released for a component clock definition, > causing some memory leak. Fix by releasing it once it is no longer > needed. > > Reported-by: Tomi Valkeinen <tomi.valkeinen@ti.com> > Signed-off-by: Tero Kristo <t-kristo@ti.com> > --- Applied to clk-next
diff --git a/drivers/clk/ti/composite.c b/drivers/clk/ti/composite.c index 6a89936ba03a..eaa43575cfa5 100644 --- a/drivers/clk/ti/composite.c +++ b/drivers/clk/ti/composite.c @@ -196,6 +196,7 @@ static void __init _register_composite(void *user, if (!cclk->comp_clks[i]) continue; list_del(&cclk->comp_clks[i]->link); + kfree(cclk->comp_clks[i]->parent_names); kfree(cclk->comp_clks[i]); }
The parent_names is never released for a component clock definition, causing some memory leak. Fix by releasing it once it is no longer needed. Reported-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Tero Kristo <t-kristo@ti.com> --- drivers/clk/ti/composite.c | 1 + 1 file changed, 1 insertion(+)