[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181016065904.53lg6zth6mjf7mkg@flea>
Date: Tue, 16 Oct 2018 08:59:04 +0200
From: Maxime Ripard <maxime.ripard@...tlin.com>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc: wens@...e.org, linus.walleij@...aro.org,
linux-arm-kernel@...ts.infradead.org, linux-gpio@...r.kernel.org,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] pinctrl: sunxi: Fix a memory leak in
'sunxi_pinctrl_build_state()'
On Tue, Oct 16, 2018 at 08:22:28AM +0200, Christophe JAILLET wrote:
> 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@...adoo.fr>
Acked-by: Maxime Ripard <maxime.ripard@...tlin.com>
Maxime
--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Powered by blists - more mailing lists