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]
Date:	Fri, 17 Jul 2015 22:30:29 +0200
From:	Takashi Iwai <tiwai@...e.de>
To:	"Christophe JAILLET" <christophe.jaillet@...adoo.fr>
Cc:	<perex@...ex.cz>, <alsa-devel@...a-project.org>,
	<kernel-janitors@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ALSA: sparc: Add missing kfree in error path

On Fri, 17 Jul 2015 20:33:21 +0200,
Christophe JAILLET wrote:
> 
> If 'of_ioremap' fails, then 'amd' should be freed, otherwise, there is a
> memory leak.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>

Applied, thanks.


Takashi

> ---
>  sound/sparc/amd7930.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/sound/sparc/amd7930.c b/sound/sparc/amd7930.c
> index 1b1a89e..784ceb8 100644
> --- a/sound/sparc/amd7930.c
> +++ b/sound/sparc/amd7930.c
> @@ -956,6 +956,7 @@ static int snd_amd7930_create(struct snd_card *card,
>  	if (!amd->regs) {
>  		snd_printk(KERN_ERR
>  			   "amd7930-%d: Unable to map chip registers.\n", dev);
> +		kfree(amd);
>  		return -EIO;
>  	}
>  
> -- 
> 2.1.4
> 
> 
--
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