From d71dd31dcff69cbdba5b2ed7fd9c230c45fd3e42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Wed, 19 Jan 2022 12:06:10 +0100 Subject: [PATCH] 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()`. --- src/modules/module-protocol-pulse/module.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/module-protocol-pulse/module.c b/src/modules/module-protocol-pulse/module.c index 194019b36..d30ac7300 100644 --- a/src/modules/module-protocol-pulse/module.c +++ b/src/modules/module-protocol-pulse/module.c @@ -67,6 +67,7 @@ struct module *module_new(struct impl *impl, const struct module_methods *method if (module == NULL) return NULL; + module->index = SPA_ID_INVALID; module->impl = impl; module->methods = methods; spa_hook_list_init(&module->listener_list);