ASoC: pcm: free path list before exiting from error conditions
authorPatrick Lai <plai@codeaurora.org>
Sun, 2 Mar 2014 19:52:57 +0000 (11:52 -0800)
committerMark Brown <broonie@linaro.org>
Wed, 5 Mar 2014 03:40:39 +0000 (11:40 +0800)
commite4ad1accb28d0ed8cea6f12395d58686ad344ca7
tree7171abea1ce01772195cac36daeb67c0301057da
parent38dbfb59d1175ef458d006556061adeaa8751b72
ASoC: pcm: free path list before exiting from error conditions

dpcm_path_get() allocates dynamic memory to hold path list.
Corresponding dpcm_path_put() must be called to free the memory.
dpcm_path_put() is not called under several error conditions.
This leads to memory leak.

Signed-off-by: Patrick Lai <plai@codeaurora.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
sound/soc/soc-pcm.c