Re: [PATCH 1/1] ALSA: ctxfi: Fix memory leakage when clearing DAO input mappers
From: Takashi Iwai
Date: Sat Oct 03 2026 - 05:20:28 EST
On Thu, 01 Oct 2026 16:45:01 +0200,
Harin Lee wrote:
>
> Commit e576e7843c0d ("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: e576e7843c0d ("ALSA: ctxfi: Simplify dao_clear_{left,right}_input() functions")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Harin Lee <me@xxxxxxxxx>
Applied now. Thanks.
Takashi