From 7696e6c1fa871236832a1e4eb6671c406efba867 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Mon, 4 Jun 2018 10:36:52 +0200 Subject: [PATCH] manager: fix failed assertion on user activations We can't use g_steal_pointer(&active) in the argument list if another argument uses @active because the order of evaluation is not defined. This fixes the following bug: src/nm-manager.c:511:_async_op_complete_ac_auth_cb: assertion failed: (active == async_op_data->ac_auth.active) Fixes: f4fc62bad8559715bde501e5a2383a2fc78a2d97 https://bugzilla.redhat.com/show_bug.cgi?id=1585494 --- src/nm-manager.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/nm-manager.c b/src/nm-manager.c index 9f0891a75d..c594f9b745 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -4747,12 +4747,16 @@ impl_manager_activate_connection (NMDBusObject *obj, if (!active) goto error; - nm_active_connection_authorize (g_steal_pointer (&active), + nm_active_connection_authorize (active, NULL, _async_op_complete_ac_auth_cb, _async_op_data_new_ac_auth_activate_user (self, active, invocation)); + + /* we passed the pointer on to _async_op_data_new_ac_auth_activate_user() */ + g_steal_pointer (&active); + return; error: