Skip to content

Conversation

@jsarha
Copy link
Contributor

@jsarha jsarha commented Oct 21, 2025

Call mod_free_all() if module specific init fails. This fixes a resource leak in case the module initialization fails in module specific init.

Call mod_free_all() if module specific init fails. This fixes a resource
leak in case the module initialization fails in module specific init.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Copilot AI review requested due to automatic review settings October 21, 2025 21:21
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a resource leak in the module adapter's generic initialization code by ensuring proper cleanup when module-specific initialization fails. The change adds a call to mod_free_all() in the error path of module_init().

Key Changes

  • Added cleanup call to mod_free_all() in the error handling path when interface->init() fails

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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.

3 participants