linux/sound/pci/ctxfi
Harin Lee 593d46fc6a ALSA: ctxfi: Fix memory leakage when clearing DAO input mappers
Commit e576e7843c ("ALSA: ctxfi: Simplify dao_clear_{left,right}_input() functions")
centralized the DAO input mapper clearing logic in
dao_clear_input(), but omitted the kfree() calls.

It removes the mapper entries from the list and sets their pointers
to NULL without freeing the allocated array. This leaks memory each
time dao_clear_input() is called.

Store the base pointer of the allocation before clearing the mapper
entries and free the array after removing entries from the list.

Fixes: e576e7843c ("ALSA: ctxfi: Simplify dao_clear_{left,right}_input() functions")
Cc: stable@vger.kernel.org
Signed-off-by: Harin Lee <me@harin.net>
Link: https://patch.msgid.link/20261001144501.3050667-2-me@harin.net
Signed-off-by: Takashi Iwai <tiwai@suse.de>
History 2026-10-03 11:14:26 +02:00
..
ct20k1reg.h ALSA: ctxfi: fix comment syntax in file headers 2021-03-18 10:14:08 +01:00
ct20k2reg.h ALSA: ctxfi: fix comment syntax in file headers 2021-03-18 10:14:08 +01:00
ctamixer.c treewide: refresh kmalloc_obj() conversions 2026-09-04 21:37:00 -07:00
ctamixer.h ALSA: ctxfi: avoid casting function pointers 2024-02-13 14:21:50 +01:00
ctatc.c ALSA: ctxfi: Add fallback to default RSR for S/PDIF 2026-04-06 10:46:13 +02:00
ctatc.h ALSA: ctxfi: Add support for dedicated RCA switching 2025-11-25 08:02:16 +01:00
ctdaio.c ALSA: ctxfi: Fix memory leakage when clearing DAO input mappers 2026-10-03 11:14:26 +02:00
ctdaio.h ALSA: ctxfi: Rename SPDIFI1 to SPDIFI_BAY 2026-04-01 14:43:54 +02:00
cthardware.c ALSA: pci/ctxfi: fix kernel-doc warnings 2020-07-07 12:05:56 +02:00
cthardware.h ALSA: ctxfi: Add support for Onkyo SE-300PCIE (OK0010) 2025-11-25 08:02:16 +01:00
cthw20k1.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
cthw20k1.h ALSA: ctxfi: fix comment syntax in file headers 2021-03-18 10:14:08 +01:00
cthw20k2.c ALSA: ctxfi: Fix silent playback on Titanium HD (SB1270) 2026-09-30 14:29:11 +02:00
cthw20k2.h ALSA: ctxfi: fix comment syntax in file headers 2021-03-18 10:14:08 +01:00
ctimap.c ALSA: pci/ctxfi: fix kernel-doc warnings 2020-07-07 12:05:56 +02:00
ctimap.h ALSA: ctxfi: fix comment syntax in file headers 2021-03-18 10:14:08 +01:00
ctmixer.c ALSA: ctxfi: Keep line/mic notification controls per mixer 2026-05-18 15:43:17 +02:00
ctmixer.h ALSA: ctxfi: Keep line/mic notification controls per mixer 2026-05-18 15:43:17 +02:00
ctpcm.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ctpcm.h ALSA: ctxfi: fix comment syntax in file headers 2021-03-18 10:14:08 +01:00
ctresource.c ALSA: ctxfi: Fix out-of-range access 2021-11-18 22:57:55 +01:00
ctresource.h ALSA: ctxfi: Fix out-of-range access 2021-11-18 22:57:55 +01:00
ctsrc.c treewide: refresh kmalloc_obj() conversions 2026-09-04 21:37:00 -07:00
ctsrc.h ALSA: ctxfi: Use flexible array for SRCIMP imappers 2026-05-15 08:56:18 +02:00
cttimer.c treewide: refresh kmalloc_obj() conversions 2026-09-04 21:37:00 -07:00
cttimer.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ctvmem.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ctvmem.h ALSA: ctxfi: Limit PTP to a single page 2026-04-06 10:44:47 +02:00
Makefile ALSA: pci: Use *-y instead of *-objs in Makefile 2024-05-08 18:17:37 +02:00
xfi.c ALSA: ctxfi: Replace deprecated strcpy() with strscpy() 2025-06-09 09:53:30 +02:00