From 6e5cc2b24f1fbd0396b12edc6d7479b4eceb58ae Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 14 Jun 2017 13:52:40 +0200 Subject: [PATCH] wifi: fix cancelling WPS during pending ProcessCredentials When we cancel WPS, we must cancel the GCancellable. Otherwise, ProcessCredentials will return and proceed with Start. Fixes: 9bfb4f0d09c20b84aac9a406b265328d267e0d8b --- src/supplicant/nm-supplicant-interface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/supplicant/nm-supplicant-interface.c b/src/supplicant/nm-supplicant-interface.c index 0ebe345837..a4681297d3 100644 --- a/src/supplicant/nm-supplicant-interface.c +++ b/src/supplicant/nm-supplicant-interface.c @@ -866,8 +866,8 @@ _wps_start (NMSupplicantInterface *self, _LOGT ("wps: cancel previous enrollment..."); data->is_cancelling = TRUE; - if (!data->cancellable) - data->cancellable = g_cancellable_new (); + nm_clear_g_cancellable (&data->cancellable); + data->cancellable = g_cancellable_new (); g_signal_handlers_disconnect_by_data (data->proxy, self); g_dbus_proxy_call (data->proxy, "Cancel",