diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2018-06-04 10:36:52 +0200 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2018-06-04 18:06:47 +0200 |
commit | 7696e6c1fa871236832a1e4eb6671c406efba867 (patch) | |
tree | 66a34c3838f153bfa199b5230eb395205ccaa29d | |
parent | 3fb4eed3ef19806f497076e1a94b5a7418ab8d7d (diff) | |
download | NetworkManager-7696e6c1fa871236832a1e4eb6671c406efba867.tar.gz |
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
-rw-r--r-- | src/nm-manager.c | 6 |
1 files changed, 5 insertions, 1 deletions
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: |