From f0a686e7843ec434b31bb9db47e8592d26a882ce Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 9 Oct 2020 19:58:28 +0200 Subject: [PATCH] pipewire: make sure we clear everything in deinit See #323 --- src/pipewire/pipewire.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/pipewire/pipewire.c b/src/pipewire/pipewire.c index 080070316..c23c2a1f8 100644 --- a/src/pipewire/pipewire.c +++ b/src/pipewire/pipewire.c @@ -418,15 +418,6 @@ void pw_deinit(void) struct registry *registry = &global_registry; struct plugin *p; - support->plugin_dir = NULL; - if (support->categories) - pw_free_strv(support->categories); - support->categories = NULL; - support->support_lib = NULL; - support->registry = NULL; - - pw_log_set(NULL); - spa_list_consume(p, ®istry->plugins, link) { struct handle *h; p->ref++; @@ -434,6 +425,12 @@ void pw_deinit(void) unref_handle(h); unref_plugin(p); } + if (support->categories) + pw_free_strv(support->categories); + pw_log_set(NULL); + spa_zero(global_support); + spa_zero(global_registry); + } /** Check if a debug category is enabled