WSL2-Linux-Kernel/sound/usb
Takashi Iwai ec439b97d9 ALSA: usb-audio: Fix NULL dererence at error path
commit 568be8aaf8 upstream.

At an error path to release URB buffers and contexts, the driver might
hit a NULL dererence for u->urb pointer, when u->buffer_size has been
already set but the actual URB allocation failed.

Fix it by adding the NULL check of urb.  Also, make sure that
buffer_size is cleared after the error path or the close.

Cc: <stable@vger.kernel.org>
Reported-by: Sabri N. Ferreiro <snferreiro1@gmail.com>
Link: https://lore.kernel.org/r/CAKG+3NRjTey+fFfUEGwuxL-pi_=T4cUskYG9OzpzHytF+tzYng@mail.gmail.com
Link: https://lore.kernel.org/r/20220930100129.19445-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-26 12:34:17 +02:00
..
6fire
bcd2000
caiaq
hiface
line6
misc
usx2y
Kconfig
Makefile
card.c
card.h
clock.c
clock.h
endpoint.c
endpoint.h
format.c
format.h
helper.c
helper.h
implicit.c
implicit.h
media.c
media.h
midi.c
midi.h
mixer.c
mixer.h
mixer_maps.c
mixer_quirks.c
mixer_quirks.h
mixer_s1810c.c
mixer_s1810c.h
mixer_scarlett.c
mixer_scarlett.h
mixer_scarlett_gen2.c
mixer_scarlett_gen2.h
mixer_us16x08.c
mixer_us16x08.h
pcm.c
pcm.h
power.c
power.h
proc.c
proc.h
quirks-table.h
quirks.c
quirks.h
stream.c
stream.h
usbaudio.h
validate.c