kernel_optimize_test/sound/usb
Wenwen Wang 3d92aa45fb ALSA: hiface: fix multiple memory leak bugs
In hiface_pcm_init(), 'rt' is firstly allocated through kzalloc(). Later
on, hiface_pcm_init_urb() is invoked to initialize 'rt->out_urbs[i]'. In
hiface_pcm_init_urb(), 'rt->out_urbs[i].buffer' is allocated through
kzalloc().  However, if hiface_pcm_init_urb() fails, both 'rt' and
'rt->out_urbs[i].buffer' are not deallocated, leading to memory leak bugs.
Also, 'rt->out_urbs[i].buffer' is not deallocated if snd_pcm_new() fails.

To fix the above issues, free 'rt' and 'rt->out_urbs[i].buffer'.

Fixes: a91c3fb2f8 ("Add M2Tech hiFace USB-SPDIF driver")
Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-08-07 12:20:00 +02:00
..
6fire
bcd2000
caiaq
hiface ALSA: hiface: fix multiple memory leak bugs 2019-08-07 12:20:00 +02:00
line6
misc
usx2y
card.c
card.h
clock.c
clock.h
debug.h
endpoint.c
endpoint.h
format.c
format.h
helper.c ALSA: usb-audio: Fix gpf in snd_usb_pipe_sanity_check 2019-07-30 12:32:21 +02:00
helper.h
Kconfig
Makefile
media.c
media.h
midi.c
midi.h
mixer_maps.c
mixer_quirks.c
mixer_quirks.h
mixer_scarlett.c
mixer_scarlett.h
mixer_us16x08.c
mixer_us16x08.h
mixer.c
mixer.h
pcm.c
pcm.h
power.c
power.h
proc.c
proc.h
quirks-table.h
quirks.c
quirks.h
stream.c ALSA: usb-audio: fix a memory leak bug 2019-08-06 12:44:44 +02:00
stream.h
usbaudio.h