summaryrefslogtreecommitdiff
path: root/sound/pci/hda
diff options
context:
space:
mode:
authorVladis Dronov <vdronov@redhat.com>2016-03-31 16:05:43 (GMT)
committerTakashi Iwai <tiwai@suse.de>2016-03-31 16:07:31 (GMT)
commit836b34a935abc91e13e63053d0a83b24dfb5ea78 (patch)
treeb2aaeb09188148c679f23eda13f7db4b933a65e9 /sound/pci/hda
parent8eb22214b7cb0c0a28be6caf3b81201629d8ea7c (diff)
downloadlinux-836b34a935abc91e13e63053d0a83b24dfb5ea78.tar.xz
ALSA: usb-audio: Fix double-free in error paths after snd_usb_add_audio_stream() call
create_fixed_stream_quirk(), snd_usb_parse_audio_interface() and create_uaxx_quirk() functions allocate the audioformat object by themselves and free it upon error before returning. However, once the object is linked to a stream, it's freed again in snd_usb_audio_pcm_free(), thus it'll be double-freed, eventually resulting in a memory corruption. This patch fixes these failures in the error paths by unlinking the audioformat object before freeing it. Based on a patch by Takashi Iwai <tiwai@suse.de> [Note for stable backports: this patch requires the commit 902eb7fd1e4a ('ALSA: usb-audio: Minor code cleanup in create_fixed_stream_quirk()')] Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1283358 Reported-by: Ralf Spenneberg <ralf@spenneberg.net> Cc: <stable@vger.kernel.org> # see the note above Signed-off-by: Vladis Dronov <vdronov@redhat.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda')
0 files changed, 0 insertions, 0 deletions