diff --git a/src/pipewire/properties.c b/src/pipewire/properties.c index 9c969252e..46b69d216 100644 --- a/src/pipewire/properties.c +++ b/src/pipewire/properties.c @@ -172,10 +172,7 @@ int pw_properties_update_string(struct pw_properties *props, const char *str, si if (spa_json_is_container(value, len)) len = spa_json_container_len(&it[1], value, len); - if ((val = strndup(value, len)) == NULL) - return -errno; - - if (spa_json_is_string(value, len)) + if ((val = malloc(len)) != NULL) spa_json_parse_string(value, len, val); } count += pw_properties_set(&impl->this, key, val);