Message ID | 20190305155753.10362-2-yung-chuan.liao@linux.intel.com (mailing list archive) |
---|---|
State | Accepted |
Commit | b3718b8f7e9b4afdfd281d35233b078585aef2e9 |
Headers | show |
Series | [1/2] ASoC: topology: free stream_name of dai_drv | expand |
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c index 4e05ef001e04..bb055c001b9c 100644 --- a/sound/soc/soc-topology.c +++ b/sound/soc/soc-topology.c @@ -1881,6 +1881,9 @@ static int soc_tplg_fe_link_create(struct soc_tplg *tplg, ret = soc_tplg_dai_link_load(tplg, link, NULL); if (ret < 0) { dev_err(tplg->comp->dev, "ASoC: FE link loading failed\n"); + kfree(link->name); + kfree(link->stream_name); + kfree(link->cpu_dai_name); kfree(link); return ret; }
Some strings are allocated by kstrdup, but not freed when error happened. Signed-off-by: Bard liao <yung-chuan.liao@linux.intel.com> --- sound/soc/soc-topology.c | 3 +++ 1 file changed, 3 insertions(+)