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:	Sun, 01 Jun 2014 14:35:15 +0200
From:	Takashi Iwai <tiwai@...e.de>
To:	Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
Cc:	Jaroslav Kysela <perex@...ex.cz>, alsa-devel@...a-project.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sound: synth: emux: soundfont.c:  Cleaning up memory leak

At Sun,  1 Jun 2014 13:35:24 +0200,
Rickard Strandqvist wrote:
> 
> There is a risk for memory leak in when something unexpected happens
> and the function returns.
> 
> This was largely found by using a static code analysis program called cppcheck.
> 
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
> ---
>  sound/synth/emux/soundfont.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/sound/synth/emux/soundfont.c b/sound/synth/emux/soundfont.c
> index 1137b85..09c5eeb 100644
> --- a/sound/synth/emux/soundfont.c
> +++ b/sound/synth/emux/soundfont.c
> @@ -1021,6 +1021,7 @@ load_guspatch(struct snd_sf_list *sflist, const char __user *data,
>  			 data, count);
>  		if (rc < 0) {
>  			sf_sample_delete(sflist, sf, smp);
> +			free(zone);

I applied the patch with the correction of a typo (it must be
kfree()).  At the next time, please compile-test at least :)


thanks,

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