Skip to content

Commit c7c1cbb

Browse files
Tero Kristobebarino
authored andcommitted
clk: ti: composite: fix memory leak
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 <[email protected]> Signed-off-by: Tero Kristo <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Acked-by: Tony Lindgren <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
1 parent 8f3d9f3 commit c7c1cbb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/clk/ti/composite.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ static void __init _register_composite(void *user,
196196
if (!cclk->comp_clks[i])
197197
continue;
198198
list_del(&cclk->comp_clks[i]->link);
199+
kfree(cclk->comp_clks[i]->parent_names);
199200
kfree(cclk->comp_clks[i]);
200201
}
201202

0 commit comments

Comments
 (0)