提交 e5af4f9f 编写于 作者: A anish kumar 提交者: Mark Brown

ASoC: dapm: fix error path in snd_soc_dapm_new_pcm

w_param_text[count] is freed in the wrong error path.
Fix it by shifting the outfree_w_param label.
Signed-off-by: Nanish kumar <yesanishhere@gmail.com>
Reviewed-by: NCharles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 2bd6bf03
......@@ -3907,9 +3907,9 @@ int snd_soc_dapm_new_pcm(struct snd_soc_card *card,
devm_kfree(card->dev, (void *)private_value);
outfree_link_name:
devm_kfree(card->dev, link_name);
outfree_w_param:
for (count = 0 ; count < num_params; count++)
devm_kfree(card->dev, (void *)w_param_text[count]);
outfree_w_param:
devm_kfree(card->dev, w_param_text);
return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册