Skip to contentSkip to conversation

ASoC: Free card DAPM context on snd_soc_instantiate_card() error path

PATCH In review Lars-Peter Clausen 2 participants 2 messages Jul 8, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: Free card DAPM context on snd_soc_instantiate_card() error path

Make sure the to free the card DAPM context if snd_soc_instantiate_card() fails, otherwise the memory allocated for the DAPM widgets is leaked.

---
 sound/soc/soc-core.c | 1 +
 1 file changed, 1 insertion(+)
sound/soc/soc-core.c +1 -0
index 2fc461c..8c8ce65 100644
@@ -1728,6 +1728,7 @@ card_probe_error:
 	if (card->remove)
 		card->remove(card);
 
+	snd_soc_dapm_free(&card->dapm);
 	soc_cleanup_card_debugfs(card);
 	snd_card_free(card->snd_card);
 
Signature · 1 line
2.1.4
maintainer
#1 lore raw

Applied "ASoC: Free card DAPM context on snd_soc_instantiate_card() error path" to the asoc tree

The patch

ASoC: Free card DAPM context on snd_soc_instantiate_card() error path

has been applied to the asoc tree at

git://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

Quoted 1 line

From 2210438b6aae9668cf89c272fef935b83aedf81d Mon Sep 17 00:00:00 2001

From: Lars-Peter Clausen <[email protected]>
Date: Wed, 8 Jul 2015 22:14:48 +0200
Subject: [PATCH] ASoC: Free card DAPM context on snd_soc_instantiate_card()
error path

Make sure the to free the card DAPM context if snd_soc_instantiate_card() fails, otherwise the memory allocated for the DAPM widgets is leaked.

---
 sound/soc/soc-core.c | 1 +
 1 file changed, 1 insertion(+)
sound/soc/soc-core.c +1 -0
index 3a4a5c0e3f97..0e1e69c7abd5 100644
@@ -1716,6 +1716,7 @@ card_probe_error:
 	if (card->remove)
 		card->remove(card);
 
+	snd_soc_dapm_free(&card->dapm);
 	soc_cleanup_card_debugfs(card);
 	snd_card_free(card->snd_card);
 
Signature · 1 line
2.1.4