diff options
author | VAUTRIN Emmanuel (Canal Plus Prestataire) <Emmanuel.VAUTRIN@cpexterne.org> | 2021-02-09 17:46:20 +0000 |
---|---|---|
committer | Daniel Wagner <wagi@monom.org> | 2021-02-10 09:14:44 +0100 |
commit | 795883e98eba3c0b2e196aaeb744ef18e887617f (patch) | |
tree | 2b38059dec748f67a9f4ed0ea42457724694fa5e /plugins | |
parent | 47bd7ab21bfbe115ca4a10b9b96bdbfeb6c35bff (diff) | |
download | connman-795883e98eba3c0b2e196aaeb744ef18e887617f.tar.gz |
wifi: Check valid network in disconnect callback
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")
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/wifi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/wifi.c b/plugins/wifi.c index 6233fe11..1a0781a6 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) |