]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitae7424dedd7af6ac047f81bee2f5786e6caf4704
tree11e1175edcf6c706f8cc3dfb020a973ad3c62808
parent5367e65a538f2d59834d845f582bc1f1ae9599b8
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