pipewire: release lock when clearing handle

The handle might want to unload plugins and we thus need to release the
lock.
This commit is contained in:
Wim Taymans 2021-09-21 10:58:07 +02:00
parent 275b8a0f9e
commit 23edb9ab2a

View file

@ -204,7 +204,9 @@ static void unref_handle(struct handle *handle)
if (--handle->ref == 0) {
spa_list_remove(&handle->link);
pw_log_debug("clear handle '%s'", handle->factory_name);
pthread_mutex_unlock(&support_lock);
spa_handle_clear(&handle->handle);
pthread_mutex_lock(&support_lock);
unref_plugin(handle->plugin);
free(handle->factory_name);
free(handle);