pulse-server: avoid crashing when clearing metadata

The key will be NULL so we can't strdup it.

Fixes #845
This commit is contained in:
Wim Taymans 2021-03-05 20:16:29 +01:00
parent 1c365f6169
commit 662fd8a1f9
2 changed files with 3 additions and 3 deletions

View file

@ -871,7 +871,7 @@ static void refresh_auto_default_nodes(struct impl *impl)
const char *name = pw_properties_get(node->obj->obj.props, PW_KEY_NODE_NAME);
char buf[1024];
if (strzcmp(name, def->value) == 0)
if (name == NULL || strzcmp(name, def->value) == 0)
continue;
free(def->value);