summaryrefslogtreecommitdiff
path: root/sound/sparc
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2021-12-13 17:15:12 +0300
committerTakashi Iwai <tiwai@suse.de>2021-12-13 18:41:12 +0300
commitdec242b6a8380c08e41e02fb54f1282894fb45cc (patch)
tree31cf4bc8b56b729fad49c9d4d3a4394d2379ce00 /sound/sparc
parentc2f51415401cb8e9b7991e828ae12ab2972f2ca7 (diff)
downloadlinux-dec242b6a8380c08e41e02fb54f1282894fb45cc.tar.xz
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 'sound/sparc')
0 files changed, 0 insertions, 0 deletions