diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2018-10-16 08:22:28 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2018-10-16 10:03:48 +0200 |
commit | a93a676b079144009f55fff2ab0e34c3b7258c8a (patch) | |
tree | 76a77125d9f31bcdf15b581d38aacb55655309f2 /drivers/mtd/nand/raw/diskonchip.c | |
parent | gpio: uniphier: include <linux/bits.h> instead of <linux/bitops.h> (diff) | |
download | linux-a93a676b079144009f55fff2ab0e34c3b7258c8a.tar.xz linux-a93a676b079144009f55fff2ab0e34c3b7258c8a.zip |
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>
Diffstat (limited to 'drivers/mtd/nand/raw/diskonchip.c')
0 files changed, 0 insertions, 0 deletions