[PATCH] ASoC: nau8810: Fix memory leak in nau8810_eq_put error path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Axel Lin <axel.lin@xxxxxxxxxx>
---
 sound/soc/codecs/nau8810.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/codecs/nau8810.c b/sound/soc/codecs/nau8810.c
index f9bcdc3..e455186 100644
--- a/sound/soc/codecs/nau8810.c
+++ b/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;
 		}
 	}
-- 
2.7.4

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux