Message ID | 1436386488-5680-1-git-send-email-lars@metafoo.de (mailing list archive) |
---|---|
State | Accepted |
Commit | 2210438b6aae9668cf89c272fef935b83aedf81d |
Headers | show |
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 2fc461c..8c8ce65 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -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);
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: Lars-Peter Clausen <lars@metafoo.de> --- sound/soc/soc-core.c | 1 + 1 file changed, 1 insertion(+)