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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20160112064447.055dcf7f@wiggum>
Date:	Tue, 12 Jan 2016 06:44:47 +0100
From:	Michael Büsch <m@...s.ch>
To:	Jia-Ju Bai <baijiaju1990@....com>
Cc:	kvalo@...eaurora.org, zajec5@...il.com, joe@...ches.com,
	davem@...emloft.net, johannes.berg@...el.com,
	linux-wireless@...r.kernel.org, b43-dev@...ts.infradead.org,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] b43: Fix memory leaks in b43_bus_dev_ssb_init and
 b43_bus_dev_bcma_init

On Tue, 12 Jan 2016 09:01:04 +0800
Jia-Ju Bai <baijiaju1990@....com> wrote:

> The memory allocated by kzalloc in b43_bus_dev_ssb_init and
> b43_bus_dev_bcma_initis not freed.
> This patch fixes the bug by adding kfree in b43_ssb_remove,
> b43_bcma_remove and error handling code of b43_bcma_probe.
> 
> Thanks Michael for his suggestion.
> 
> Signed-off-by: Jia-Ju Bai <baijiaju1990@....com>
> ---
>  drivers/net/wireless/b43/main.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
> index ec013fb..2c9d9c1 100644
> --- a/drivers/net/wireless/b43/main.c
> +++ b/drivers/net/wireless/b43/main.c
> @@ -5683,6 +5683,7 @@ static int b43_bcma_probe(struct bcma_device *core)
>  	schedule_work(&wl->firmware_load);
>  
>  bcma_out:
> +	kfree(dev);
>  	return err;
>  

This is not correct. It will also free dev for the non-error exit.


-- 
Michael

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ