Searched hist:"89 fea04c" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/gpio/ |
H A D | gpiolib-of.c | 89fea04c Sat Jul 06 08:34:22 CDT 2019 Nishka Dasgupta <nishkadg.linux@gmail.com> gpiolib: of: fix a memory leak in of_gpio_flags_quirks()
Each iteration of for_each_child_of_node puts the previous node, but in the case of a break from the middle of the loop, there is no put, thus causing a memory leak. Hence add an of_node_put before the break. Issue found with Coccinelle.
Cc: <stable@vger.kernel.org> Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> [Bartosz: tweaked the commit message] Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> 89fea04c Sat Jul 06 08:34:22 CDT 2019 Nishka Dasgupta <nishkadg.linux@gmail.com> gpiolib: of: fix a memory leak in of_gpio_flags_quirks() Each iteration of for_each_child_of_node puts the previous node, but in the case of a break from the middle of the loop, there is no put, thus causing a memory leak. Hence add an of_node_put before the break. Issue found with Coccinelle. Cc: <stable@vger.kernel.org> Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> [Bartosz: tweaked the commit message] Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|