[ALSA] sound: initialize rawmidi substream list
authorAkinobu Mita <akinobu.mita@gmail.com>
Thu, 23 Nov 2006 11:02:33 +0000 (12:02 +0100)
committerJaroslav Kysela <perex@server.perex.cz>
Wed, 20 Dec 2006 07:55:59 +0000 (08:55 +0100)
commitc13893d7be4f159b359a1b7ee46b3646ecb2fe20
tree3e4bb900eb0776f2a7cc4d36551459d86081c7c8
parenta48bb28c167b5cad1bd4978dbb83c89252caab78
[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: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
sound/core/rawmidi.c