acrn-kernel/sound/isa/gus
Takashi Iwai dec242b6a8 ALSA: gus: Fix memory leaks at memory allocator error paths
When snd_gf1_mem_xalloc() returns NULL, the current code still leaves
the formerly allocated block.name string but returns an error
immediately.  This patch does code-refactoring to move the kstrdup()
call itself into snd_gf1_mem_xalloc() and deals with the resource free
in the helper code by itself for fixing those memory leaks.

Suggested-by: Jaroslav Kysela <perex@perex.cz>
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20211213132444.22385-2-tiwai@suse.de
Link: https://lore.kernel.org/r/20211213141512.27359-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-12-13 16:41:12 +01:00
..
Makefile
gus_dma.c ALSA: gus: fix null pointer dereference on pointer block 2021-10-26 08:02:16 +02:00
gus_dram.c
gus_io.c
gus_irq.c
gus_main.c ALSA: gus: Fix repeated probes of snd_gus_create() 2021-09-07 11:40:07 +02:00
gus_mem.c ALSA: gus: Fix memory leaks at memory allocator error paths 2021-12-13 16:41:12 +01:00
gus_mem_proc.c
gus_mixer.c ALSA: gus: Fix assignment in if condition 2021-06-09 17:29:39 +02:00
gus_pcm.c ALSA: gus: Fix assignment in if condition 2021-06-09 17:29:39 +02:00
gus_reset.c
gus_tables.h
gus_timer.c
gus_uart.c ALSA: gus: Fix assignment in if condition 2021-06-09 17:29:39 +02:00
gus_volume.c
gusclassic.c ALSA: gus: Allocate resources with device-managed APIs 2021-07-19 16:17:22 +02:00
gusextreme.c ALSA: gus: Allocate resources with device-managed APIs 2021-07-19 16:17:22 +02:00
gusmax.c ALSA: gus: Allocate resources with device-managed APIs 2021-07-19 16:17:22 +02:00
interwave-stb.c
interwave.c ALSA: gus: Fix repeated probe for ISA interwave card 2021-09-07 11:40:08 +02:00