pulse-server: module-null-sink: provide fallback name

If no `sink_name` has been specified, use "null-sink" to avoid a
NULL pointer dereference later in the function.
This commit is contained in:
Barnabás Pőcze 2021-06-06 16:10:45 +02:00
parent 09c162c8bf
commit 12359b490d

View file

@ -146,6 +146,10 @@ struct module *create_module_null_sink(struct impl *impl, const char *argument)
pw_properties_set(props, PW_KEY_NODE_NAME, str);
pw_properties_set(props, "sink_name", NULL);
}
else {
pw_properties_set(props, PW_KEY_NODE_NAME, "null-sink");
}
if ((str = pw_properties_get(props, "sink_properties")) != NULL) {
module_args_add_props(props, str);
pw_properties_set(props, "sink_properties", NULL);