mirror of
https://github.com/torvalds/linux.git
synced 2026-06-06 21:45:45 +02:00
ALSA: usb-audio: avoid freeing umidi object twice
commit 07d86ca93d 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>
This commit is contained in:
parent
bb1066e621
commit
fbb430c51d
|
|
@ -2454,7 +2454,6 @@ int snd_usbmidi_create(struct snd_card *card,
|
|||
else
|
||||
err = snd_usbmidi_create_endpoints(umidi, endpoints);
|
||||
if (err < 0) {
|
||||
snd_usbmidi_free(umidi);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user