diff options
author | Takashi Iwai <[email protected]> | 2021-12-13 15:15:12 +0100 |
---|---|---|
committer | Takashi Iwai <[email protected]> | 2021-12-13 16:41:12 +0100 |
commit | dec242b6a8380c08e41e02fb54f1282894fb45cc (patch) | |
tree | 31cf4bc8b56b729fad49c9d4d3a4394d2379ce00 /drivers/usb/cdns3/cdns3-imx.c | |
parent | c2f51415401cb8e9b7991e828ae12ab2972f2ca7 (diff) |
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 <[email protected]>
Reviewed-by: Jaroslav Kysela <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-imx.c')
0 files changed, 0 insertions, 0 deletions