public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: pxa-ssp: fix a memory leak in pxa_ssp_remove()
@ 2010-08-25  8:59 Axel Lin
  2010-08-25  9:53 ` Liam Girdwood
  2010-08-25 13:22 ` Mark Brown
  0 siblings, 2 replies; 5+ messages in thread
From: Axel Lin @ 2010-08-25  8:59 UTC (permalink / raw)
  To: linux-kernel; +Cc: Liam Girdwood, Mark Brown

The "priv" allocated in pxa_ssp_probe() should be kfreed in pxa_ssp_remove().

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
This patch is against 2.6.36-rc2-git3.
 sound/soc/pxa/pxa-ssp.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c
index a1fd23e..2a9cac7 100644
--- a/sound/soc/pxa/pxa-ssp.c
+++ b/sound/soc/pxa/pxa-ssp.c
@@ -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 |\
-- 
1.7.2




^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-08-26  8:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-25  8:59 [PATCH] ASoC: pxa-ssp: fix a memory leak in pxa_ssp_remove() Axel Lin
2010-08-25  9:53 ` Liam Girdwood
2010-08-25 13:22 ` Mark Brown
2010-08-26  6:10   ` Axel Lin
2010-08-26  8:47     ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox