OSDN Git Service

ASoC: rsnd: don't double free kctrl
authorColin Ian King <colin.king@canonical.com>
Thu, 8 Dec 2016 13:05:43 +0000 (13:05 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Nov 2017 08:39:14 +0000 (08:39 +0000)
commit0e11f7efc0f68c2021e5813b30f690749f9280a4
treec7b1c96b6334b8dee9408dde2c2efbd606e98aba
parent0117c75537cfebc048afed5980246cfd123086f0
ASoC: rsnd: don't double free kctrl

[ 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