aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorAndrey Konovalov <andreyknvl@gmail.com>2016-02-13 11:08:06 +0300
committerAndreas Blaesius <skate4life@gmx.de>2016-10-12 23:25:50 +0200
commitbfaf38b5aeea650efbd82bf3ea85023a1386d961 (patch)
tree190fa072f5826b6ab79fbee70a32353b6718564f /sound
parent4c657ddd1f5e7c36472c751620302bb8740c053f (diff)
downloadkernel_samsung_espresso10-bfaf38b5aeea650efbd82bf3ea85023a1386d961.zip
kernel_samsung_espresso10-bfaf38b5aeea650efbd82bf3ea85023a1386d961.tar.gz
kernel_samsung_espresso10-bfaf38b5aeea650efbd82bf3ea85023a1386d961.tar.bz2
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. Change-Id: I8534867beeac111370017ef246adc17e23e1a3b1 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>
Diffstat (limited to 'sound')
-rw-r--r--sound/usb/midi.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/sound/usb/midi.c b/sound/usb/midi.c
index c635a2d..9e864e9 100644
--- a/sound/usb/midi.c
+++ b/sound/usb/midi.c
@@ -2213,7 +2213,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;
}