about summary refs log tree commit diff
path: root/src/nm-auth-utils.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2017-05-11 15:03:26 +0200
committerMichael Biebl <biebl@debian.org>2017-05-11 15:03:26 +0200
commit04996460fa839109b6318838d1f41e5f3ef8139a (patch)
treecb35e54363b8ea8e78e6978a92fb68ae9409e116 /src/nm-auth-utils.c
parent1ae6f6dc1b3c266401a4709995991b967320139a (diff)
parentc333f062ddcba9b35330647bf6cbd0a07f2d786e (diff)
Merge tag 'upstream/1.8.0' into experimental
Upstream version 1.8.0
Diffstat (limited to 'src/nm-auth-utils.c')
-rw-r--r--src/nm-auth-utils.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/nm-auth-utils.c b/src/nm-auth-utils.c
index 930f6d0f..b8e64ceb 100644
--- a/src/nm-auth-utils.c
+++ b/src/nm-auth-utils.c
@@ -301,12 +301,10 @@ auth_call_cancel (gpointer user_data)
 {
 	AuthCall *call = user_data;
 
-	if (call->cancellable) {
+	if (nm_clear_g_cancellable (&call->cancellable)) {
 		/* we don't free call immediately. Instead we cancel the async operation
 		 * and set cancellable to NULL. pk_call_cb() will check for this and
 		 * do the final cleanup. */
-		g_cancellable_cancel (call->cancellable);
-		g_clear_object (&call->cancellable);
 	} else {
 		g_source_remove (call->call_idle_id);
 		auth_call_free (call);
@@ -319,7 +317,7 @@ pk_call_cb (GObject *object, GAsyncResult *result, gpointer user_data)
 {
 	AuthCall *call = user_data;
 	GError *error = NULL;
-	gboolean is_authorized, is_challenge;
+	gboolean is_authorized = FALSE, is_challenge = FALSE;
 	guint call_result = NM_AUTH_CALL_RESULT_UNKNOWN;
 
 	nm_auth_manager_polkit_authority_check_authorization_finish (NM_AUTH_MANAGER (object),