From: "Arend van Spriel" <arend@broadcom.com>
To: "Jesper Juhl" <jj@chaosbits.net>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Alwin Beukers" <alwin@broadcom.com>,
"Pieter-Paul Giesberts" <pieterpg@broadcom.com>,
"John W. Linville" <linville@tuxdriver.com>,
"Franky (Zhenhui) Lin" <frankyl@broadcom.com>
Subject: Re: [PATCH] brcm80211: Don't leak 'vbuffer' in brcmf_sdbrcm_write_vars()
Date: Mon, 9 Jan 2012 11:01:15 +0100 [thread overview]
Message-ID: <4F0ABAEB.5070306@broadcom.com> (raw)
In-Reply-To: <alpine.LNX.2.00.1201082338350.24030@swampdragon.chaosbits.net>
On 01/08/2012 11:41 PM, Jesper Juhl wrote:
> If the memory allocation 'nvram_ularray = kmalloc(varsize,
> GFP_ATOMIC);' fails we'll leak the memory allocated to 'vbuffer' when
> we return -ENOMEM from the function.
>
> This patch resolves the leak by kfree()'ing the allocated memory
> before the return.
>
> Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Nice catch. Thanks.
Acked-by: Arend van Spriel <arend@broadcom.com>
Gr. AvS
prev parent reply other threads:[~2012-01-09 10:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-08 22:41 [PATCH] brcm80211: Don't leak 'vbuffer' in brcmf_sdbrcm_write_vars() Jesper Juhl
2012-01-09 10:01 ` Arend van Spriel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F0ABAEB.5070306@broadcom.com \
--to=arend@broadcom.com \
--cc=alwin@broadcom.com \
--cc=frankyl@broadcom.com \
--cc=jj@chaosbits.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=netdev@vger.kernel.org \
--cc=pieterpg@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).