Skip to contentSkip to conversation

ASoC: davinci-vcif - fix a memory leak

PATCH Applied Axel Lin 3 participants 3 messages Nov 25, 2010

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 ASoC: davinci-vcif - fix a memory leak

---
 sound/soc/davinci/davinci-vcif.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
sound/soc/davinci/davinci-vcif.c +3 -0
index fb4cc1e..9d2afcc 100644
@@ -247,7 +247,10 @@ fail:
 
 static int davinci_vcif_remove(struct platform_device *pdev)
 {
+	struct davinci_vcif_dev *davinci_vcif_dev = dev_get_drvdata(&pdev->dev);
+
 	snd_soc_unregister_dai(&pdev->dev);
+	kfree(davinci_vcif_dev);
 
 	return 0;
 }
Signature · 1 line
1.7.2
Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Axel Lin
---
 sound/soc/davinci/davinci-vcif.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
sound/soc/davinci/davinci-vcif.c +0 -0
index fb4cc1e..9d2afcc 100644

sound/soc/davinci/davinci-vcif.c fail: · line 256

Quoted 10 lines
sound/soc/davinci/davinci-vcif.c +3 -0
@@ -247,7 +247,10 @@ fail:
 
 static int davinci_vcif_remove(struct platform_device *pdev)
 {
+	struct davinci_vcif_dev *davinci_vcif_dev = dev_get_drvdata(&pdev->dev);
+
 	snd_soc_unregister_dai(&pdev->dev);
+	kfree(davinci_vcif_dev);
 
 	return 0;
 }
Signature · 3 lines
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk