[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTimDHO=oiR3ncX4BLmMJaoUAmaQL6r=bZcWV4-Gg@mail.gmail.com>
Date: Tue, 11 Jan 2011 18:30:03 +0100
From: Ivo Van Doorn <ivdoorn@...il.com>
To: Jesper Juhl <jj@...osbits.net>
Cc: linux-wireless@...r.kernel.org, users@...x00.serialmonkey.com,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
Gertjan van Wingerde <gwingerde@...il.com>,
"John W. Linville" <linville@...driver.com>
Subject: Re: [PATCH] rt2x00: Don't leak mem in error path of rt2x00lib_request_firmware()
Hi,
> We need to release_firmware() in order not to leak memory.
>
> Signed-off-by: Jesper Juhl <jj@...osbits.net>
I can assume that release_firmware() checks if 'fw' is null?
If so:
Acked-by: Ivo van Doorn <IvDoorn@...il.com>
> ---
> rt2x00firmware.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/wireless/rt2x00/rt2x00firmware.c b/drivers/net/wireless/rt2x00/rt2x00firmware.c
> index f0e1eb7..be0ff78 100644
> --- a/drivers/net/wireless/rt2x00/rt2x00firmware.c
> +++ b/drivers/net/wireless/rt2x00/rt2x00firmware.c
> @@ -58,6 +58,7 @@ static int rt2x00lib_request_firmware(struct rt2x00_dev *rt2x00dev)
>
> if (!fw || !fw->size || !fw->data) {
> ERROR(rt2x00dev, "Failed to read Firmware.\n");
> + release_firmware(fw);
> return -ENOENT;
> }
>
>
>
> --
> Jesper Juhl <jj@...osbits.net> http://www.chaosbits.net/
> Don't top-post http://www.catb.org/~esr/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