mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 14:44:12 +00:00
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: Andrey Konovalov <andreyknvl@gmail.com> Acked-by: Clemens Ladisch <clemens@ladisch.de> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
86c2ee1670
commit
07d86ca93d
1 changed files with 0 additions and 1 deletions
|
@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
|
||||||
else
|
else
|
||||||
err = snd_usbmidi_create_endpoints(umidi, endpoints);
|
err = snd_usbmidi_create_endpoints(umidi, endpoints);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
snd_usbmidi_free(umidi);
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue