From 46533e7da4a8474bbb74648515a477aaca3b8c35 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 15 Jun 2021 18:24:11 +0200 Subject: [PATCH] firewall: use nm_g_main_context_push_thread_default_if_necessary() in _fw_nft_call_communicate_cb() There is no need to push (and pop) the same main-context. (cherry picked from commit 654bb92a6968d9cee03b0c70d7797b057734e2a3) --- src/core/nm-firewall-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/nm-firewall-utils.c b/src/core/nm-firewall-utils.c index cd9609ab26..cee4eebf8a 100644 --- a/src/core/nm-firewall-utils.c +++ b/src/core/nm-firewall-utils.c @@ -419,7 +419,7 @@ _fw_nft_call_communicate_cb(GObject *source, GAsyncResult *result, gpointer user { _nm_unused nm_auto_pop_gmaincontext GMainContext *main_context = - nm_g_main_context_push_thread_default(NULL); + nm_g_main_context_push_thread_default_if_necessary(NULL); nm_shutdown_wait_obj_register_object(call_data->subprocess, "nft-terminate"); G_STATIC_ASSERT_EXPR(200 < NM_SHUTDOWN_TIMEOUT_MS_WATCHDOG * 2 / 3);