diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2018-10-16 08:22:28 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-12-01 09:13:25 +0100 |
commit | e4f1ef290e89628877088f6d2723d33e7c9090d0 (patch) | |
tree | 840195715cf1616655e9e4323d5a816725795870 /drivers/pwm/pwm-lpss.c | |
parent | fb7a0caf45dae36dd750d596939fb805ab5b72f5 (diff) |
pinctrl: sunxi: Fix a memory leak in 'sunxi_pinctrl_build_state()'
[ Upstream commit a93a676b079144009f55fff2ab0e34c3b7258c8a ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/pwm/pwm-lpss.c')
0 files changed, 0 insertions, 0 deletions