diff options
| -rw-r--r-- | sound/core/seq/seq_virmidi.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/core/seq/seq_virmidi.c b/sound/core/seq/seq_virmidi.c index 3da2d48610b3..f71aedfb408c 100644 --- a/sound/core/seq/seq_virmidi.c +++ b/sound/core/seq/seq_virmidi.c | |||
| @@ -254,9 +254,13 @@ static int snd_virmidi_output_open(struct snd_rawmidi_substream *substream) | |||
| 254 | */ | 254 | */ |
| 255 | static int snd_virmidi_input_close(struct snd_rawmidi_substream *substream) | 255 | static int snd_virmidi_input_close(struct snd_rawmidi_substream *substream) |
| 256 | { | 256 | { |
| 257 | struct snd_virmidi_dev *rdev = substream->rmidi->private_data; | ||
| 257 | struct snd_virmidi *vmidi = substream->runtime->private_data; | 258 | struct snd_virmidi *vmidi = substream->runtime->private_data; |
| 258 | snd_midi_event_free(vmidi->parser); | 259 | |
| 260 | write_lock_irq(&rdev->filelist_lock); | ||
| 259 | list_del(&vmidi->list); | 261 | list_del(&vmidi->list); |
| 262 | write_unlock_irq(&rdev->filelist_lock); | ||
| 263 | snd_midi_event_free(vmidi->parser); | ||
| 260 | substream->runtime->private_data = NULL; | 264 | substream->runtime->private_data = NULL; |
| 261 | kfree(vmidi); | 265 | kfree(vmidi); |
| 262 | return 0; | 266 | return 0; |
