Commit 70715371 authored by Enze Li's avatar Enze Li Committed by Andrew Morton
Browse files

mm/damon/core: fix potential memory leak by cleaning ops_filter in damon_destroy_scheme

Currently, damon_destroy_scheme() only cleans up the filter list but
leaves ops_filter untouched, which could lead to memory leaks when a
scheme is destroyed.

This patch ensures both filter and ops_filter are properly freed in
damon_destroy_scheme(), preventing potential memory leaks.

Link: https://lkml.kernel.org/r/20251014084225.313313-1-lienze@kylinos.cn


Fixes: ab82e579 ("mm/damon/core: introduce damos->ops_filters")
Signed-off-by: default avatarEnze Li <lienze@kylinos.cn>
Reviewed-by: default avatarSeongJae Park <sj@kernel.org>
Tested-by: default avatarSeongJae Park <sj@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent cec944dd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment