From: Manuel Lauss Date: Tue, 1 Dec 2009 17:10:35 +0000 (+0100) Subject: ASoC: au1x: dbdma2: plug memleak in pcm device creation error path X-Git-Tag: v2.6.33-rc1~390^2~1^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=efd9eb96d5604c2c133e500f7b8c7b3f3fbdece8;p=thirdparty%2Fkernel%2Flinux.git ASoC: au1x: dbdma2: plug memleak in pcm device creation error path free the allocated pcm platform device in the error path. Signed-off-by: Manuel Lauss Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- diff --git a/sound/soc/au1x/dbdma2.c b/sound/soc/au1x/dbdma2.c index 2ca33b09a8678..19e4d37eba1cf 100644 --- a/sound/soc/au1x/dbdma2.c +++ b/sound/soc/au1x/dbdma2.c @@ -480,6 +480,7 @@ struct platform_device *au1xpsc_pcm_add(struct platform_device *pdev) if (!ret) return pd; + platform_device_put(pd); out: kfree(res); return NULL;