mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
pulse-server: module: initialize index
Initialize the index to `SPA_ID_INVALID` when a module object is created. This way `module_free()` may be called right after `module_new()`.
This commit is contained in:
parent
abe87f8008
commit
d71dd31dcf
1 changed files with 1 additions and 0 deletions
|
|
@ -67,6 +67,7 @@ struct module *module_new(struct impl *impl, const struct module_methods *method
|
||||||
if (module == NULL)
|
if (module == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
module->index = SPA_ID_INVALID;
|
||||||
module->impl = impl;
|
module->impl = impl;
|
||||||
module->methods = methods;
|
module->methods = methods;
|
||||||
spa_hook_list_init(&module->listener_list);
|
spa_hook_list_init(&module->listener_list);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue