[PATCH 2/2] ASoC: au1x: dbdma2: plug memleak in pcm device creation error path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



free the allocated pcm platform device in the error path.

Signed-off-by: Manuel Lauss <manuel.lauss@xxxxxxxxx>
---
 sound/soc/au1x/dbdma2.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/sound/soc/au1x/dbdma2.c b/sound/soc/au1x/dbdma2.c
index 148e205..6d9f4c6 100644
--- a/sound/soc/au1x/dbdma2.c
+++ b/sound/soc/au1x/dbdma2.c
@@ -478,6 +478,7 @@ struct platform_device *au1xpsc_pcm_add(struct platform_device *pdev)
 	if (!ret)
 		return pd;
 
+	platform_device_put(pd);
 out:
 	kfree(res);
 	return NULL;
-- 
1.6.5.3

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux