From: David Miller <davem@davemloft.net>
To: jj@chaosbits.net
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
sjur.brandeland@stericsson.com
Subject: Re: [PATCH] caif: fix cfcnfg_add_phy_layer() leaks
Date: Mon, 24 Oct 2011 18:36:23 -0400 (EDT) [thread overview]
Message-ID: <20111024.183623.551713905402332500.davem@davemloft.net> (raw)
In-Reply-To: <alpine.LNX.2.00.1110242359160.19795@swampdragon.chaosbits.net>
From: Jesper Juhl <jj@chaosbits.net>
Date: Tue, 25 Oct 2011 00:01:00 +0200 (CEST)
> There are two locations where we 'goto out' after having allocated
> memory for 'phyinfo' but have not yet assigned it to anything. At the
> 'out:' label we'll exit from the function and 'phyinfo' will go out of
> scope and thus we leak the memory we allocated.
>
> This patch frees the memory before jumping to 'out:', thus fixing the
> leaks.
>
> Signed-off-by: Jesper Juhl <jj@chaosbits.net>
The code in net-next looks a lot different, please see if the issue
still exists there and resubmit if so, thanks!
prev parent reply other threads:[~2011-10-24 22:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-24 22:01 [PATCH] caif: fix cfcnfg_add_phy_layer() leaks Jesper Juhl
2011-10-24 22:36 ` David Miller [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=20111024.183623.551713905402332500.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=jj@chaosbits.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sjur.brandeland@stericsson.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).