ASoC: pcm: fix dpcm_path_put in dpcm runtime update
authorQiao Zhou <zhouqiao@marvell.com>
Wed, 4 Jun 2014 11:42:06 +0000 (19:42 +0800)
committerMark Brown <broonie@linaro.org>
Sat, 21 Jun 2014 10:29:42 +0000 (11:29 +0100)
we need to release dapm widget list after dpcm_path_get in
soc_dpcm_runtime_update. otherwise, there will be potential memory
leak. add dpcm_path_put to fix it.

Signed-off-by: Qiao Zhou <zhouqiao@marvell.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
sound/soc/soc-pcm.c

index 54d18f22a33e4716b05292f252b53e553d85f8ba..4ea656770d65a93b55921cc8b8d7bd34d039747b 100644 (file)
@@ -2069,6 +2069,7 @@ int soc_dpcm_runtime_update(struct snd_soc_card *card)
                        dpcm_be_disconnect(fe, SNDRV_PCM_STREAM_PLAYBACK);
                }
 
+               dpcm_path_put(&list);
 capture:
                /* skip if FE doesn't have capture capability */
                if (!fe->cpu_dai->driver->capture.channels_min)