lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 4 Dec 2013 08:30:37 +0000
From:	Lee Jones <lee.jones@...aro.org>
To:	Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:	Andres Salomon <dilinger@...ued.net>,
	Samuel Ortiz <sameo@...ux.intel.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mfd: Fix memory leak in mfd_add_devices()

On Tue, 29 Oct 2013, Geert Uytterhoeven wrote:

> If the first call to mfd_add_device() fails, no child devices have been
> registered to the parent yet, and thus mfd_remove_devices() won't find
> anything to remove nor free.
> Hence the previously allocated array of atomic_t objects will leak.
> 
> Free the array instead of calling mfd_remove_devices() on failure during
> the first loop iteration to fix this.
> 
> Signed-off-by: Geert Uytterhoeven <geert@...ux-m68k.org>
> ---
>  drivers/mfd/mfd-core.c |   12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)

Hmm... I didn't see my reply to this, but it has been applied for a
while.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ