From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Julia Lawall <julia@diku.dk>
Cc: alsa-devel@alsa-project.org, Takashi Iwai <tiwai@suse.de>,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
Liam Girdwood <lrg@slimlogic.co.uk>
Subject: Re: [PATCH 8/8] sound/soc: introduce missing kfree
Date: Sat, 12 Sep 2009 11:50:30 +0000 [thread overview]
Message-ID: <20090912115029.GA14300@sirena.org.uk> (raw)
In-Reply-To: <Pine.LNX.4.64.0909111822480.10552@pc-004.diku.dk>
On Fri, Sep 11, 2009 at 06:23:04PM +0200, Julia Lawall wrote:
> From: Julia Lawall <julia@diku.dk>
> Error handling code following a kzalloc should free the allocated data.
> Error handling code following an ioremap should iounmap the allocated data.
This doesn't seem to be a complete fix for the issue. There are several
other places where the function can fail but which don't do this cleanup
- this may indicate a problem with the automatic analysis if it fails to
spot the problem in the fixed code?
In general for this sort of issue I'd suggest considering adding the
error handling using the goto unwind block style since that tends to be
a bit more robust against forgotten error handling than adding unwind
code at each error site. It's also a bit more managable when the code
is doing a series of allocations like this is.
next prev parent reply other threads:[~2009-09-12 11:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-11 16:23 [PATCH 8/8] sound/soc: introduce missing kfree Julia Lawall
2009-09-12 11:50 ` Mark Brown [this message]
2009-09-12 11:58 ` Julia Lawall
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=20090912115029.GA14300@sirena.org.uk \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=julia@diku.dk \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@slimlogic.co.uk \
--cc=tiwai@suse.de \
/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