From: Axel Lin <axel.lin@gmail.com>
To: linux-kernel <linux-kernel@vger.kernel.org>
Cc: Liam Girdwood <lrg@slimlogic.co.uk>,
Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: [PATCH 5/5] ASoC: Fix incorrect kfree in wm8962_probe error path
Date: Tue, 16 Nov 2010 16:11:37 +0800 [thread overview]
Message-ID: <1289895097.19543.12.camel@mola> (raw)
In-Reply-To: <1289895041.19543.10.camel@mola>
We allocated memory for wm8962 in wm8962_i2c_probe,
and will free the memory in either wm8962_i2c_probe error path
or wm8962_i2c_remove.
Thus we should not call kfree(wm8962) in wm8962_probe, otherwise
we have double free of wm8962.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
sound/soc/codecs/wm8962.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index e021866..9f6beca 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -3874,7 +3874,6 @@ err_enable:
err_get:
regulator_bulk_free(ARRAY_SIZE(wm8962->supplies), wm8962->supplies);
err:
- kfree(wm8962);
return ret;
}
--
1.7.2
next prev parent reply other threads:[~2010-11-16 8:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-16 8:06 [PATCH 0/5] ASoC: Fix incorrect kfree in error path Axel Lin
2010-11-16 8:08 ` [PATCH 1/5] ASoC: Fix incorrect kfree in ad1836_probe " Axel Lin
2010-11-16 8:08 ` [PATCH 2/5] ASoC: Fix incorrect kfree in ad193x_probe " Axel Lin
2010-11-16 8:09 ` [PATCH 3/5] ASoC: Fix incorrect kfree in aic3x_probe " Axel Lin
2010-11-16 8:10 ` [PATCH 4/5] ASoC: Fix incorrect kfree in wm8731_probe " Axel Lin
2010-11-16 8:11 ` Axel Lin [this message]
2010-11-16 9:52 ` [PATCH 0/5] ASoC: Fix incorrect kfree in " Liam Girdwood
2010-11-16 11:37 ` Mark Brown
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=1289895097.19543.12.camel@mola \
--to=axel.lin@gmail.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@slimlogic.co.uk \
/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).