ASoC: fix memory leak
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Mon, 22 Feb 2016 08:44:31 +0000 (14:14 +0530)
committerMark Brown <broonie@kernel.org>
Mon, 22 Feb 2016 10:40:06 +0000 (19:40 +0900)
commit513cb31120fb5a5b02d9e42eb1d0a0bf05e227c5
tree11e1175edcf6c706f8cc3dfb020a973ad3c62808
parent92e963f50fc74041b5e9e744c330dca48e04f08d
ASoC: fix memory leak

If dai_link is already bound then we just returned and leaked rtd and
rtd->codec_dais which were allocated by soc_new_pcm_runtime(). We do not
need this newly allocated rtd to check if dai_link is already binded. Lets
check first if it is already binded before allocating this memory.

Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-core.c