alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Axel Lin <axel.lin@ingics.com>
To: Mark Brown <broonie@kernel.org>
Cc: Axel Lin <axel.lin@ingics.com>,
	alsa-devel@alsa-project.org, John Hsu <KCHSU0@nuvoton.com>,
	Liam Girdwood <lgirdwood@gmail.com>
Subject: [PATCH] ASoC: nau8810: Fix memory leak in nau8810_eq_put error path
Date: Thu, 25 Aug 2016 08:55:27 +0800	[thread overview]
Message-ID: <1472086527-14900-1-git-send-email-axel.lin@ingics.com> (raw)

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 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

                 reply	other threads:[~2016-08-25  0:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1472086527-14900-1-git-send-email-axel.lin@ingics.com \
    --to=axel.lin@ingics.com \
    --cc=KCHSU0@nuvoton.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).