[alsa-devel] Applied "ASoC: topology: free link string in error" to the asoc tree

Mark Brown broonie at kernel.org
Tue Mar 19 14:13:26 CET 2019


The patch

   ASoC: topology: free link string in error

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From b3718b8f7e9b4afdfd281d35233b078585aef2e9 Mon Sep 17 00:00:00 2001
From: Bard liao <yung-chuan.liao at linux.intel.com>
Date: Tue, 5 Mar 2019 23:57:53 +0800
Subject: [PATCH] ASoC: topology: free link string in error

Some strings are allocated by kstrdup, but not freed when error
happened.

Signed-off-by: Bard liao <yung-chuan.liao at linux.intel.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart at linux.intel.com>
Signed-off-by: Mark Brown <broonie at kernel.org>
---
 sound/soc/soc-topology.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index 1be60cea2bf5..c6a30d000f59 100644
--- a/sound/soc/soc-topology.c
+++ b/sound/soc/soc-topology.c
@@ -1883,6 +1883,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;
 	}
-- 
2.20.1



More information about the Alsa-devel mailing list