diff options
author | Daniel Mack <daniel@zonque.org> | 2014-10-07 13:41:24 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-11-14 08:59:45 -0800 |
commit | 878afee9d08fecdbfac33eb1aeae5faad4d46a90 (patch) | |
tree | 9acc2c93db05b6d8cc724b6f5f8a1b59955737c3 /fs/ubifs/commit.c | |
parent | cb8603233b8ab33786916b7e47ee3f61f59387b2 (diff) |
ASoC: soc-dapm: fix use after free
commit e5092c96c9c28f4d12811edcd02ca8eec16e748e upstream.
Coverity spotted the following possible use-after-free condition in
dapm_create_or_share_mixmux_kcontrol():
If kcontrol is NULL, and (wname_in_long_name && kcname_in_long_name)
validates to true, 'name' will be set to an allocated string, and be
freed a few lines later via the 'long_name' alias. 'name', however,
is used by dev_err() in case snd_ctl_add() fails.
Fix this by adding a jump label that frees 'long_name' at the end of
the function.
Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/ubifs/commit.c')
0 files changed, 0 insertions, 0 deletions