* [PATCH AUTOSEL 4.9 44/80] clk: ti: composite: fix memory leak
[not found] <20200618012819.609778-1-sashal@kernel.org>
@ 2020-06-18 1:27 ` Sasha Levin
0 siblings, 0 replies; only message in thread
From: Sasha Levin @ 2020-06-18 1:27 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Tero Kristo, Tomi Valkeinen, Tony Lindgren, Stephen Boyd,
Sasha Levin, linux-omap, linux-clk
From: Tero Kristo <t-kristo@ti.com>
[ Upstream commit c7c1cbbc9217ebb5601b88d138d4a5358548de9d ]
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>
Link: https://lkml.kernel.org/r/20200429131341.4697-2-t-kristo@ti.com
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/clk/ti/composite.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/clk/ti/composite.c b/drivers/clk/ti/composite.c
index 1cf70f452e1e..3725b2e0c788 100644
--- a/drivers/clk/ti/composite.c
+++ b/drivers/clk/ti/composite.c
@@ -226,6 +226,7 @@ static void __init _register_composite(struct clk_hw *hw,
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]);
}
--
2.25.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-06-18 1:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20200618012819.609778-1-sashal@kernel.org>
2020-06-18 1:27 ` [PATCH AUTOSEL 4.9 44/80] clk: ti: composite: fix memory leak Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).