Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit c13893d7 authored by Akinobu Mita's avatar Akinobu Mita Committed by Jaroslav Kysela
Browse files

[ALSA] sound: initialize rawmidi substream list



If snd_rawmidi_new() failed to allocate substreams for input
(snd_rawmidi_alloc_substreams() failed to populate a
&rmidi->streams[SNDRV_RAWMIDI_STREAM_INPUT]), it will try to
free rawmidi instance by snd_rawmidi_free().
But it will cause oops because snd_rawmidi_free() tries to free
both of substreams list but list for output
(&rmidi->streams[SNDRV_RAWMIDI_STREAM_OUTPUT]) is not initialized yet.

Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@suse.cz>
parent a48bb28c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment