Skip to content

Commit 49300b6

Browse files
committed
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 <liam.r.girdwood@linux.intel.com>
1 parent 3f7738d commit 49300b6

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/math/fft/fft_common.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ struct fft_plan *fft_plan_common_new(struct processing_module *mod, void *inb,
5353
break;
5454
default:
5555
comp_cl_err(mod->dev, "Invalid word length.");
56+
mod_free(mod, plan);
5657
return NULL;
5758
}
5859

0 commit comments

Comments
 (0)