Revert "global: handle id allocation errors"

This reverts commit e241febe62.
This commit is contained in:
Wim Taymans 2022-01-14 20:01:25 +01:00
parent 92ef2cd56b
commit adee9931b6

View file

@ -98,17 +98,12 @@ pw_global_new(struct pw_context *context,
spa_list_init(&this->resource_list);
spa_hook_list_init(&this->listener_list);
if (pw_context_add_global(context, this) == SPA_ID_INVALID) {
res = -ENOMEM;
goto error_free;
}
pw_context_add_global(context, this);
pw_log_debug("%p: new %s %d", this, this->type, this->id);
return this;
error_free:
free(this);
error_cleanup:
pw_properties_free(properties);
errno = -res;