]> 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)
commitf4b606fbe00b0991678450effbbcbf66f473ed42
treee1e873a19c6e582f1efe0a36fd7444584364c7e7
parent9d51bd3969bafd1fdf98d572e5529ad113f24f7e
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: e1adcbc42886 ("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