pulse-server: module-x11-bell: initialize module member

Previously, `module_x11_bell_data::module` was not initialized
properly, which led to a NULL pointer dereference in
`module_schedule_unload()` when called from `module_destroy()`
in case the native pipewire module was unloaded.

See #2392
This commit is contained in:
Barnabás Pőcze 2022-05-21 18:40:30 +02:00
parent 700b1e7ff8
commit 893567bed6

View file

@ -112,8 +112,9 @@ static const struct spa_dict_item module_x11_bell_info[] = {
struct module *create_module_x11_bell(struct impl *impl, const char *argument)
{
struct module *module;
struct pw_properties *props = NULL;
struct module_x11_bell_data *data;
struct module *module;
int res;
PW_LOG_TOPIC_INIT(mod_topic);
@ -133,6 +134,9 @@ struct module *create_module_x11_bell(struct impl *impl, const char *argument)
}
module->props = props;
data = module->user_data;
data->module = module;
return module;
out:
pw_properties_free(props);