Re: [PATCH] ALSA: trident: Fix a memory leak in snd_trident_create

2020-07-11 Thread Navid Emamdoost
On Sat, Jul 11, 2020 at 4:04 AM Takashi Iwai wrote: > > On Sat, 11 Jul 2020 09:08:30 +0200, > Navid Emamdoost wrote: > > > > In the implementation of snd_trident_create(), the allocated trident is > > leaked if snd_trident_mixer() fails. Release via snd_trident_free(). > > No, this patch would

Re: [PATCH] ALSA: trident: Fix a memory leak in snd_trident_create

2020-07-11 Thread Takashi Iwai
On Sat, 11 Jul 2020 09:08:30 +0200, Navid Emamdoost wrote: > > In the implementation of snd_trident_create(), the allocated trident is > leaked if snd_trident_mixer() fails. Release via snd_trident_free(). No, this patch would result in double-free. The manual release of trident object isn't

[PATCH] ALSA: trident: Fix a memory leak in snd_trident_create

2020-07-11 Thread Navid Emamdoost
In the implementation of snd_trident_create(), the allocated trident is leaked if snd_trident_mixer() fails. Release via snd_trident_free(). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Navid Emamdoost --- sound/pci/trident/trident_main.c | 5 - 1 file changed, 4 insertions(+), 1