diff options
author | Vijay Mali <vmali@nvidia.com> | 2014-03-20 14:55:25 +0530 |
---|---|---|
committer | Bharat Nihalani <bnihalani@nvidia.com> | 2014-03-26 22:55:38 -0700 |
commit | a34582db5031c2aaeb4ead623262eae427ac9153 (patch) | |
tree | 048cf062f4d3ab207e88817a02c4d06d41425812 /sound | |
parent | 14293be15bd52432a70612f200d702c8055d2332 (diff) |
asoc: tegra: Fix memory leak
Bug 1484645
Change-Id: Ic55505b6dc7fec7e57e3f95cfa8f73402ba587df
Signed-off-by: Vijay Mali <vmali@nvidia.com>
Reviewed-on: http://git-master/r/384329
(cherry-picked from commit 593dadabaa17b676c899ca159f76107697fd90c6)
Reviewed-on: http://git-master/r/386304
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/tegra/tegra_pcm.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/soc/tegra/tegra_pcm.c b/sound/soc/tegra/tegra_pcm.c index d5c76b28dd98..51903fdda089 100644 --- a/sound/soc/tegra/tegra_pcm.c +++ b/sound/soc/tegra/tegra_pcm.c @@ -104,11 +104,19 @@ static int tegra_pcm_open(struct snd_pcm_substream *substream) static int tegra_pcm_close(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct tegra_runtime_data *tegra_prtd; if (rtd->dai_link->no_pcm) return 0; + tegra_prtd = + (struct tegra_runtime_data *)snd_dmaengine_pcm_get_data( + substream); + kfree(tegra_prtd); + + snd_dmaengine_pcm_set_data(substream, NULL); snd_dmaengine_pcm_close_release_chan(substream); + return 0; } |