global: don't destroy resources when unregistering

We can unregister the global without having to destroy the
resources. We always destroy the resources when the global is
destroyed.
This commit is contained in:
Wim Taymans 2019-03-13 16:23:26 +01:00
parent f0c887186c
commit 7b2f96ae75

View file

@ -167,8 +167,6 @@ static int global_unregister(struct pw_global *global)
if (PW_PERM_IS_R(permissions))
pw_registry_resource_global_remove(resource, global->id);
}
spa_list_consume(resource, &global->resource_list, link)
pw_resource_destroy(resource);
spa_list_remove(&global->link);
pw_map_remove(&core->globals, global->id);