From 49300b66f5bc6affdf56c225cc5b857839a6564d Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Thu, 11 Jun 2026 14:31:24 +0100 Subject: [PATCH] fft: free the plan on the invalid word length path The plan was allocated before the word-length switch and leaked when the default case rejected an unsupported length. Free it before returning. Signed-off-by: Liam Girdwood --- src/math/fft/fft_common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/math/fft/fft_common.c b/src/math/fft/fft_common.c index 5ce47acd025a..589571881443 100644 --- a/src/math/fft/fft_common.c +++ b/src/math/fft/fft_common.c @@ -53,6 +53,7 @@ struct fft_plan *fft_plan_common_new(struct processing_module *mod, void *inb, break; default: comp_cl_err(mod->dev, "Invalid word length."); + mod_free(mod, plan); return NULL; }