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>
Wed, 17 Feb 2016 20:30:58 +0000 (12:30 -0800)
commitfbb430c51d7ac989b79bf1adb40cce7af581682a
treec4f503873a357923019dcf5a5c64ac84777d46f2
parentbb1066e621a195c5e9013f05b4f3d7dc46809923
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