[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <965f715c-a714-00df-b496-a586969dd086@linaro.org>
Date: Thu, 20 Feb 2020 11:30:09 +0000
From: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
To: Bartosz Golaszewski <brgl@...ev.pl>,
Linus Walleij <linus.walleij@...aro.org>,
Khouloud Touil <ktouil@...libre.com>,
Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
Bartosz Golaszewski <bgolaszewski@...libre.com>
Subject: Re: [PATCH v4 1/4] nvmem: fix memory leak in error path
On 20/02/2020 10:01, Bartosz Golaszewski wrote:
> - if (IS_ERR(nvmem->wp_gpio))
> + if (IS_ERR(nvmem->wp_gpio)) {
> + ida_simple_remove(&nvmem_ida, nvmem->id);
> + kfree(nvmem);
> return ERR_CAST(nvmem->wp_gpio);
You freed nvmem just before this statement, how can nvmem->wp_gpio be
still be valid?
Are you able to test this changes at your end?
Or
these are just compile tested?
--srini
> + }
>
Powered by blists - more mailing lists