Skip to content

fft: free the plan on the invalid word length path#10936

Merged
kv2019i merged 1 commit into
thesofproject:mainfrom
lgirdwood:fix-math-fft
Jun 18, 2026
Merged

fft: free the plan on the invalid word length path#10936
kv2019i merged 1 commit into
thesofproject:mainfrom
lgirdwood:fix-math-fft

Conversation

@lgirdwood

Copy link
Copy Markdown
Member

fft_plan_common_new() allocated the plan before the word-length switch and
leaked it when the default case rejected an unsupported length. Free the
plan before returning NULL on that 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>
Copilot AI review requested due to automatic review settings June 17, 2026 13:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Fixes a memory leak in fft_plan_common_new() by freeing an allocated FFT plan when an unsupported word length hits the default switch case.

Changes:

  • Free plan before returning NULL on the invalid word-length path.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@kv2019i kv2019i merged commit 1c62c01 into thesofproject:main Jun 18, 2026
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants