From e5af4f9fb3d405e6145f0d019ce11a97a8930915 Mon Sep 17 00:00:00 2001 From: anish kumar Date: Wed, 20 Sep 2017 01:28:33 -0700 Subject: [PATCH] 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 --- sound/soc/soc-dapm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.30.2