mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-15 08:56:38 -05:00
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:
parent
700b1e7ff8
commit
893567bed6
1 changed files with 5 additions and 1 deletions
|
|
@ -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 *create_module_x11_bell(struct impl *impl, const char *argument)
|
||||||
{
|
{
|
||||||
struct module *module;
|
|
||||||
struct pw_properties *props = NULL;
|
struct pw_properties *props = NULL;
|
||||||
|
struct module_x11_bell_data *data;
|
||||||
|
struct module *module;
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
PW_LOG_TOPIC_INIT(mod_topic);
|
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;
|
module->props = props;
|
||||||
|
|
||||||
|
data = module->user_data;
|
||||||
|
data->module = module;
|
||||||
|
|
||||||
return module;
|
return module;
|
||||||
out:
|
out:
|
||||||
pw_properties_free(props);
|
pw_properties_free(props);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue