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)
commit45a481c2176f6acca2efb6477c6018b2c3e3c60f
treee1e873a19c6e582f1efe0a36fd7444584364c7e7
parent358bdf892f6bfacf20884b54a35ab038321f06f9
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: 5fe225c105fd ("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