From: Takashi Iwai <tiwai@suse.de>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Jean Delvare <khali@linux-fr.org>, alsa-devel@alsa-project.org
Subject: Re: [PATCH] ASoC: Fix double free and memory leak in many codec drivers
Date: Mon, 25 Aug 2008 13:53:10 +0200 [thread overview]
Message-ID: <s5hljyle2ft.wl%tiwai@suse.de> (raw)
In-Reply-To: <1219661360-3555-1-git-send-email-broonie@opensource.wolfsonmicro.com>
At Mon, 25 Aug 2008 11:49:20 +0100,
Mark Brown wrote:
>
> From: Jean Delvare <khali@linux-fr.org>
>
> Many SoC audio codec drivers have improper freeing of memory in error
> paths.
>
> * codec is allocated in the platform device probe function, but is not
> freed there in case of error. Instead it is freed in the i2c device
> probe function's error path. However the success or failure of both
> functions is not linked, so this could result in a double free (if
> the platform device is successfully probed, the i2c device probing
> fails and then the platform driver is unregistered.)
>
> * codec->private_data is allocated in many platform device probe
> functions but not freed in their error paths.
>
> This patch hopefully solves all these problems.
>
> Signed-off-by: Jean Delvare <khali@linux-fr.org>
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This looks like a 2.6.27 material, right?
I applied to for-linus branch now. Thanks.
Takashi
next prev parent reply other threads:[~2008-08-25 11:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-25 10:49 [PATCH] ASoC: Fix double free and memory leak in many codec drivers Mark Brown
2008-08-25 11:53 ` Takashi Iwai [this message]
2008-08-25 12:11 ` Mark Brown
2008-08-26 12:19 ` Takashi Iwai
2008-08-26 12:23 ` Jean Delvare
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=s5hljyle2ft.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=khali@linux-fr.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.