Skip to content
Commit a93a676b authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Linus Walleij
Browse files

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: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: default avatarMaxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent ee8edbf8
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment