summaryrefslogtreecommitdiffstats
path: root/include/sound/hdaudio_ext.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2021-12-13 15:15:12 +0100
committerTakashi Iwai <tiwai@suse.de>2021-12-13 16:41:12 +0100
commitdec242b6a8380c08e41e02fb54f1282894fb45cc (patch)
tree31cf4bc8b56b729fad49c9d4d3a4394d2379ce00 /include/sound/hdaudio_ext.h
parentc2f51415401cb8e9b7991e828ae12ab2972f2ca7 (diff)
downloadlinux-dec242b6a8380c08e41e02fb54f1282894fb45cc.tar.gz
linux-dec242b6a8380c08e41e02fb54f1282894fb45cc.tar.bz2
linux-dec242b6a8380c08e41e02fb54f1282894fb45cc.zip
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>
Diffstat (limited to 'include/sound/hdaudio_ext.h')
0 files changed, 0 insertions, 0 deletions