]> git.baikalelectronics.ru Git - kernel.git/commit
clk: iproc: fix memory leak from clock name
authorRay Jui <rjui@broadcom.com>
Mon, 29 Jun 2015 21:30:09 +0000 (14:30 -0700)
committerStephen Boyd <sboyd@codeaurora.org>
Thu, 2 Jul 2015 16:50:26 +0000 (09:50 -0700)
commit3243b4f5ce6e41c2d5db2199ef226120c66f0162
treee1e873a19c6e582f1efe0a36fd7444584364c7e7
parent843641414cd74b36a67cbcd1ad48924f183d92e6
clk: iproc: fix memory leak from clock name

of_property_read_string_index takes array of pointers and assign them to
strings read from device tree property. No additional memory allocation
is needed prior to calling of_property_read_string_index. In fact, since
the array of pointers will be re-assigned to other strings, any memory
that it points to prior to calling of_property_read_string_index will be
leaked

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Ray Jui <rjui@broadcom.com>
Fixes: 07b7d3c293ab ("clk: iproc: add initial common clock support")
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/bcm/clk-iproc-asiu.c
drivers/clk/bcm/clk-iproc-pll.c