From: anish kumar Date: Wed, 20 Sep 2017 08:28:33 +0000 (-0700) Subject: ASoC: dapm: fix error path in snd_soc_dapm_new_pcm X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e5af4f9fb3d405e6145f0d019ce11a97a8930915;p=openwrt%2Fstaging%2Fblogic.git 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: anish kumar Reviewed-by: Charles Keepax Signed-off-by: Mark Brown --- diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index dcef67a9bd48..f51f61340f9c 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -3907,9 +3907,9 @@ outfree_private_value: 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;