Commit ffdd0aec8a5b44b9310b3e0695f7b7bf8e4478dc

Authored by Tero Kristo
Committed by Lokesh Vutla
1 parent ff151ed770

clk: ti: dra7-atl-clock: fix a memory leak

of_clk_add_provider makes an internal copy of the parent_names property
while its called, thus it is no longer needed after this call and can
be freed.

Signed-off-by: Tero Kristo <t-kristo@ti.com>

Showing 1 changed file with 1 additions and 0 deletions Side-by-side Diff

drivers/clk/ti/clk-dra7-atl.c
... ... @@ -199,6 +199,7 @@
199 199  
200 200 if (!IS_ERR(clk)) {
201 201 of_clk_add_provider(node, of_clk_src_simple_get, clk);
  202 + kfree(parent_names);
202 203 return;
203 204 }
204 205 cleanup: