ASoC: pxa-ssp: fix a memory leak in pxa_ssp_remove()
Subsystems (3)
PATCH 1/1 ASoC: pxa-ssp: fix a memory leak in pxa_ssp_remove()
The "priv" allocated in pxa_ssp_probe() should be kfreed in pxa_ssp_remove().
---
This patch is against 2.6.36-rc2-git3.
sound/soc/pxa/pxa-ssp.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
sound/soc/pxa/pxa-ssp.c +1 -0
@@ -760,6 +760,7 @@ static void pxa_ssp_remove(struct platform_device *pdev, {struct ssp_priv *priv = dai->private_data;pxa_ssp_free (priv->ssp); +kfree (priv); }#define PXA_SSP_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\
Signature · 1 line
1.7.2
Quoted 13 lines · Axel Lin
The "priv" allocated in
pxa_ssp_probe()should be kfreed inpxa_ssp_remove().Signed-off-by Axel Lin <[email protected]>---
This patch is against 2.6.36-rc2-git3.sound/soc/pxa/pxa-ssp.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)sound/soc/pxa/pxa-ssp.c +0
-0
sound/soc/pxa/pxa-ssp.c static void pxa_ssp_remove(struct platform_device *pdev, · line 766
Quoted 7 lines
sound/soc/pxa/pxa-ssp.c +1
-0@@ -760,6 +760,7 @@ static void pxa_ssp_remove(struct platform_device *pdev, {struct ssp_priv *priv = dai->private_data;pxa_ssp_free (priv->ssp); +kfree (priv); }#define PXA_SSP_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\
Signature · 3 lines
Freelance Developer, SlimLogic Ltd ASoC and Voltage Regulator Maintainer. http://www.slimlogic.co.uk
Quoted 3 lines · Axel Lin
The "priv" allocated in
pxa_ssp_probe()should be kfreed inpxa_ssp_remove().Signed-off-by Axel Lin <[email protected]>
This doesn't apply against current ASoC. I fixed this up by hand since the error was so trivial but in future could you please make sure you generate your code against the latest version of ASoC? This will be in -next at any given time, or for the individual tree you want the latest for-2.6.nn branch of:
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6.git
2010/8/25 Mark Brown <[email protected]>:
Quoted 5 lines · Axel Lin
Quoted 3 lines
The "priv" allocated in
pxa_ssp_probe()should be kfreed inpxa_ssp_remove().Signed-off-by Axel Lin <[email protected]>
Quoted 8 lines
This doesn't apply against current ASoC. I fixed this up by hand since the error was so trivial but in future could you please make sure you generate your code against the latest version of ASoC? This will be in -next at any given time, or for the individual tree you want the latest for-2.6.nn branch of:
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6.git
Thanks, Mark.
I just thought this fix should be applied to 2.6.36. And ASoC tree will have this fix after merge 2.6.36.
Regards,
Axel
Quoted 2 lines · Axel Lin
I just thought this fix should be applied to 2.6.36. And ASoC tree will have this fix after merge 2.6.36.
It's a memory leak on unload for a driver for a device integrated into an embedded SoC - I'd be astonished if anyone managed to run into it in production.