Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2210438b authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Mark Brown
Browse files

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.

Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent e18077b6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);