Commit 07d86ca9 authored by Andrey Konovalov's avatar Andrey Konovalov Committed by Takashi Iwai
Browse files

ALSA: usb-audio: avoid freeing umidi object twice

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: default avatarAndrey Konovalov <>
Acked-by: default avatarClemens Ladisch <>
Cc: <>
Signed-off-by: default avatarTakashi Iwai <>
parent 86c2ee16
......@@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
return err;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment