Re: [PATCH] ALSA: opti9xx: Fix memleak in snd_opti9xx_read_check

2020-08-31 Thread Takashi Iwai
On Sat, 29 Aug 2020 10:05:15 +0200, Dinghao Liu wrote: > > When request_region() on chip->res_mc_indir fails, > chip->res_mc_base should be freed to prevent memleak. > > Signed-off-by: Dinghao Liu The resources are freed automatically at private_free callback (snd_card_opti9xx_free()) called

[PATCH] ALSA: opti9xx: Fix memleak in snd_opti9xx_read_check

2020-08-29 Thread Dinghao Liu
When request_region() on chip->res_mc_indir fails, chip->res_mc_base should be freed to prevent memleak. Signed-off-by: Dinghao Liu --- sound/isa/opti9xx/opti92x-ad1848.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sound/isa/opti9xx/opti92x-ad1848.c