From 4aa817771abe2d1bdf3eb1bca18de392d7e78a35 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 1 Apr 2021 09:04:55 +0200 Subject: [PATCH] pulse-server: arguments can be NULL And module-null-sink does not have mandatory arguments. --- src/modules/module-protocol-pulse/module-null-sink.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/modules/module-protocol-pulse/module-null-sink.c b/src/modules/module-protocol-pulse/module-null-sink.c index 007a33c34..15931bee2 100644 --- a/src/modules/module-protocol-pulse/module-null-sink.c +++ b/src/modules/module-protocol-pulse/module-null-sink.c @@ -112,16 +112,13 @@ static struct module *create_module_null_sink(struct impl *impl, const char *arg const char *str; int res; - if (argument == NULL) { - res = -EINVAL; - goto out; - } props = pw_properties_new(NULL, NULL); if (props == NULL) { res = -EINVAL; goto out; } - add_props(props, argument); + if (argument) + add_props(props, argument); if ((str = pw_properties_get(props, "sink_name")) != NULL) { pw_properties_set(props, PW_KEY_NODE_NAME, str);