ALSA: usb-audio: avoid freeing umidi object twice
authorAndrey Konovalov <andreyknvl@gmail.com>
Sat, 13 Feb 2016 08:08:06 +0000 (11:08 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 19 Feb 2016 22:22:39 +0000 (14:22 -0800)
commit482c4c1a74eab8c45ece6b353a92d65154b7ea98
treec965f79f1b1f418a3b1b6d0bc8daa4da8b50fe4a
parentfc345885783318c63a9860d4476e8cc4257de230
ALSA: usb-audio: avoid freeing umidi object twice

commit 07d86ca93db7e5cdf4743564d98292042ec21af7 upstream.

The 'umidi' object will be free'd on the error path by snd_usbmidi_free()
when tearing down the rawmidi interface. So we shouldn't try to free it
in snd_usbmidi_create() after having registered the rawmidi interface.

Found by KASAN.

Signed-off-by: Andrey Konovalov <andreyknvl@gmail.com>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/usb/midi.c