stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "ASoC: rsnd: don't double free kctrl" has been added to the 4.4-stable tree
@ 2017-11-28  9:57 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-11-28  9:57 UTC (permalink / raw)
  To: colin.king, alexander.levin, broonie, gregkh,
	kuninori.morimoto.gx
  Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    ASoC: rsnd: don't double free kctrl

to the 4.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     asoc-rsnd-don-t-double-free-kctrl.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From foo@baz Tue Nov 28 10:56:34 CET 2017
From: Colin Ian King <colin.king@canonical.com>
Date: Thu, 8 Dec 2016 13:05:43 +0000
Subject: ASoC: rsnd: don't double free kctrl

From: Colin Ian King <colin.king@canonical.com>


[ Upstream commit 0ea617a298dcdc2251b4e10f83ac3f3e627b66e3 ]

On an error, snd_ctl_add already free's kctrl, so calling snd_ctl_free_one
to free it again leads to a double free error.  Fix this by removing
the extraneous snd_ctl_free_one call.

Issue found using static analysis with CoverityScan, CID 1372908

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 sound/soc/sh/rcar/core.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -1049,10 +1049,8 @@ static int __rsnd_kctrl_new(struct rsnd_
 		return -ENOMEM;
 
 	ret = snd_ctl_add(card, kctrl);
-	if (ret < 0) {
-		snd_ctl_free_one(kctrl);
+	if (ret < 0)
 		return ret;
-	}
 
 	cfg->update = update;
 	cfg->card = card;


Patches currently in stable-queue which might be from colin.king@canonical.com are

queue-4.4/asoc-rsnd-don-t-double-free-kctrl.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-11-28  9:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-28  9:57 Patch "ASoC: rsnd: don't double free kctrl" has been added to the 4.4-stable tree gregkh

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).