dec242b6 | 13-Dec-2021 |
Takashi Iwai <tiwai@suse.de> |
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 immedi
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>
show more ...
|
c2f51415 | 13-Dec-2021 |
Takashi Iwai <tiwai@suse.de> |
ALSA: gus: Fix erroneous memory allocation
snd_gf1_mem_xalloc() returns NULL incorrectly when the memory chunk is allocated in the middle of the chain. This patch corrects the return value to treat
ALSA: gus: Fix erroneous memory allocation
snd_gf1_mem_xalloc() returns NULL incorrectly when the memory chunk is allocated in the middle of the chain. This patch corrects the return value to treat it properly.
Reviewed-by: Jaroslav Kysela <perex@perex.cz> Link: https://lore.kernel.org/r/20211213132444.22385-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
c5433f02 | 07-Sep-2021 |
Takashi Iwai <tiwai@suse.de> |
ALSA: gus: Fix repeated probe for ISA interwave card
The legacy ISA probe tries to probe the card repeatedly, and this would conflict with the refactoring using devres. Put the card creation out of
ALSA: gus: Fix repeated probe for ISA interwave card
The legacy ISA probe tries to probe the card repeatedly, and this would conflict with the refactoring using devres. Put the card creation out of the loop and only probe GUS object repeatedly.
Fixes: 5b88da3c800f ("ALSA: gus: Allocate resources with device-managed APIs") Link: https://lore.kernel.org/r/20210907093930.29009-2-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
6a4f2b69 | 02-Jul-2020 |
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> |
ALSA: isa/gus: remove 'set but not used' warning
Fix W=1 warning by noting variable as __always_unused.
sound/isa/gus/gus_uart.c: In function ‘snd_gf1_interrupt_midi_in’: sound/isa/gus/gus_uart.c:1
ALSA: isa/gus: remove 'set but not used' warning
Fix W=1 warning by noting variable as __always_unused.
sound/isa/gus/gus_uart.c: In function ‘snd_gf1_interrupt_midi_in’: sound/isa/gus/gus_uart.c:16:22: warning: variable ‘data’ set but not used [-Wunused-but-set-variable] 16 | unsigned char stat, data, byte;
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702193604.169059-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|