Skip to content

Commit

Permalink
lib_manager: fix a memory leak
Browse files Browse the repository at this point in the history
If module_adapter_new() fails in lib_manager_module_create(),
lib_manager_free_module() must be called to free allocated resources.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
  • Loading branch information
lyakh committed May 2, 2024
1 parent efed286 commit bbbbc92
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/library_manager/lib_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,8 @@ static struct comp_dev *lib_manager_module_create(const struct comp_driver *drv,
struct processing_module *mod = comp_get_drvdata(dev);

mod->priv.llext = tmp_proc.priv.llext;
} else {
lib_manager_free_module(module_id);
}
return dev;
}
Expand Down

0 comments on commit bbbbc92

Please sign in to comment.