[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Mon, 10 Oct 2016 10:36:33 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Johannes Thumshirn <jthumshirn@...e.de>
Cc: "linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/3] pinctrl: sunxi: Don't leak memory in case krealloc() failes
On Fri, Sep 30, 2016 at 2:14 PM, Johannes Thumshirn <jthumshirn@...e.de> wrote:
> If krealloc() fails there's no way of freeing the memory previously allocated
> for pctl->functions as it is overwritten by krealloc()'s return value. Fix
> this by assigning the return value to a temporary variable first so we can do
> error handling (which we didn't do at all before).
>
> Signed-off-by: Johannes Thumshirn <jthumshirn@...e.de>
Patch applied.
Yours,
Linus Walleij
Powered by blists - more mailing lists