13 Dec
2021
13 Dec
'21
4:15 p.m.
On 13. 12. 21 15:15, Takashi Iwai wrote:
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 Link: https://lore.kernel.org/r/20211213132444.22385-2-tiwai@suse.de Signed-off-by: Takashi Iwai tiwai@suse.de
Reviewed-by: Jaroslav Kysela perex@perex.cz
Thanks.
Jaroslav
--
Jaroslav Kysela perex@perex.cz
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.