[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <s5h1uzbz74w.wl%tiwai@suse.de>
Date: Fri, 03 Jun 2011 09:49:51 +0200
From: Takashi Iwai <tiwai@...e.de>
To: Jesper Juhl <jj@...osbits.net>
Cc: linux-kernel@...r.kernel.org, alsa-devel@...a-project.org,
Daniel Mack <zonque@...il.com>,
Lucas De Marchi <lucas.demarchi@...fusion.mobi>,
Torsten Schenk <torsten.schenk@...o.com>,
Jaroslav Kysela <perex@...ex.cz>
Subject: Re: [PATCH] Sound, 6fire: Don't leak firmware in error path
At Mon, 30 May 2011 12:49:01 +0200 (CEST),
Jesper Juhl wrote:
>
> One of the error paths in
> sound/usb/6fire/firmware.c::usb6fire_fw_ezusb_upload() neglects to free
> the memory allocated for the firmware before returning, thus leaking the
> memory.
>
> Signed-off-by: Jesper Juhl <jj@...osbits.net>
Applied now. Thanks.
Takashi
> ---
> firmware.c | 1 +
> 1 file changed, 1 insertion(+)
>
> patch against 3.0-rc1
> compile tested only
>
> diff --git a/sound/usb/6fire/firmware.c b/sound/usb/6fire/firmware.c
> index d47beff..a91719d 100644
> --- a/sound/usb/6fire/firmware.c
> +++ b/sound/usb/6fire/firmware.c
> @@ -227,6 +227,7 @@ static int usb6fire_fw_ezusb_upload(
> ret = usb6fire_fw_ihex_init(fw, rec);
> if (ret < 0) {
> kfree(rec);
> + release_firmware(fw);
> snd_printk(KERN_ERR PREFIX "error validating ezusb "
> "firmware %s.\n", fwname);
> return ret;
>
>
> --
> Jesper Juhl <jj@...osbits.net> http://www.chaosbits.net/
> Don't top-post http://www.catb.org/jargon/html/T/top-post.html
> Plain text mails only, please.
>
--
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