summaryrefslogtreecommitdiff
path: root/drivers/clk
diff options
context:
space:
mode:
authorTero Kristo <t-kristo@ti.com>2020-04-29 16:13:39 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-06-25 16:41:52 +0300
commitfa2ddb114121654b3fc660eb26ffb6b08936bd5c (patch)
tree2acbefee113bc976f2dd5bf0beefd282ca9bdc57 /drivers/clk
parent6a1fa20e971f84f30c092ff41bfc081fc5f07281 (diff)
downloadlinux-fa2ddb114121654b3fc660eb26ffb6b08936bd5c.tar.xz
clk: ti: composite: fix memory leak
[ 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>
Diffstat (limited to 'drivers/clk')
-rw-r--r--drivers/clk/ti/composite.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/clk/ti/composite.c b/drivers/clk/ti/composite.c
index beea89463ca2..4ea5c08a1eb6 100644
--- a/drivers/clk/ti/composite.c
+++ b/drivers/clk/ti/composite.c
@@ -240,6 +240,7 @@ cleanup:
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]);
}