Send connman mailing list submissions to
        [email protected]

To subscribe or unsubscribe via email, send a message with subject or
body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."

Today's Topics:

   1. [PATCH] wifi: Check valid network in disconnect callback
      (VAUTRIN Emmanuel (Canal Plus Prestataire))


----------------------------------------------------------------------

Date: Tue, 9 Feb 2021 17:46:20 +0000
From: "VAUTRIN Emmanuel (Canal Plus Prestataire)"
        <[email protected]>
Subject: [PATCH] wifi: Check valid network in disconnect callback
To: "[email protected]" <[email protected]>
Message-ID:  <[email protected]
        prd02.prod.outlook.com>
Content-Type: text/plain; charset="iso-8859-1"

Check the involved network validity in disconnect callback, to avoid
side effects, as crashing, when processing an already released one.

Fixes: dd86f09107e8 ("wifi: Always disconnect connection completely")
---
 plugins/wifi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/plugins/wifi.c b/plugins/wifi.c
index 6233fe1167f1..1a0781a69918 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -2263,7 +2263,8 @@ static void disconnect_callback(int result, 
GSupplicantInterface *interface,
                return;
        }
 
-       connman_network_set_connected(network, false);
+       if (g_slist_find(wifi->networks, network))
+               connman_network_set_connected(network, false);
 
        if (network != wifi->network) {
                if (network == wifi->pending_network)
-- 
2.25.1


------------------------------

Subject: Digest Footer

_______________________________________________
connman mailing list -- [email protected]
To unsubscribe send an email to [email protected]


------------------------------

End of connman Digest, Vol 64, Issue 10
***************************************

Reply via email to