From 23edb9ab2abd16f05f8d10fa0f1e88a8d64ccf50 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 21 Sep 2021 10:58:07 +0200 Subject: [PATCH] pipewire: release lock when clearing handle The handle might want to unload plugins and we thus need to release the lock. --- src/pipewire/pipewire.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pipewire/pipewire.c b/src/pipewire/pipewire.c index 067650730..6d2b63c1a 100644 --- a/src/pipewire/pipewire.c +++ b/src/pipewire/pipewire.c @@ -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);