Browse Source

ASoC: nau8810: Fix memory leak in nau8810_eq_put error path

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Axel Lin 9 years ago
parent
commit
ec10396477
1 changed files with 1 additions and 0 deletions
  1. 1 0
      sound/soc/codecs/nau8810.c

+ 1 - 0
sound/soc/codecs/nau8810.c

@@ -221,6 +221,7 @@ static int nau8810_eq_put(struct snd_kcontrol *kcontrol,
 		if (ret) {
 			dev_err(codec->dev, "EQ configuration fail, register: %x ret: %d\n",
 				reg + i, ret);
+			kfree(data);
 			return ret;
 		}
 	}