Home
last modified time | relevance | path

Searched hist:a93a676b079144009f55fff2ab0e34c3b7258c8a (Results 1 – 1 of 1) sorted by relevance

/linux/drivers/pinctrl/sunxi/
H A Dpinctrl-sunxi.ca93a676b079144009f55fff2ab0e34c3b7258c8a Tue Oct 16 06:22:28 UTC 2018 Christophe JAILLET <christophe.jaillet@wanadoo.fr> pinctrl: sunxi: Fix a memory leak in 'sunxi_pinctrl_build_state()'

If 'krealloc()' fails, 'pctl->functions' is set to NULL.
We should instead use a temp variable in order to be able to free the
previously allocated memeory, in case of OOM.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>