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: <4DDC77A5.6020607@st.com>
Date:	Wed, 25 May 2011 08:59:41 +0530
From:	Pratyush Anand <pratyush.anand@...com>
To:	Axel Lin <axel.lin@...il.com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] drivers/misc: fix a memory leak in spear_pcie_gadget_probe
 error path

On 5/25/2011 8:53 AM, Axel Lin wrote:
> In the case of goto err_kzalloc, we should kfree target.
> 

Yes, you are right. Its a mistake.

Regards
Pratyush

> Signed-off-by: Axel Lin <axel.lin@...il.com>
> ---
>  drivers/misc/spear13xx_pcie_gadget.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/misc/spear13xx_pcie_gadget.c b/drivers/misc/spear13xx_pcie_gadget.c
> index 7aded90..cfbddbe 100644
> --- a/drivers/misc/spear13xx_pcie_gadget.c
> +++ b/drivers/misc/spear13xx_pcie_gadget.c
> @@ -845,7 +845,7 @@ err_iounmap:
>  err_iounmap_app:
>  	iounmap(config->va_app_base);
>  err_kzalloc:
> -	kfree(config);
> +	kfree(target);
>  err_rel_res:
>  	release_mem_region(res1->start, resource_size(res1));
>  err_rel_res0:

--
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