As interface_removed() gets called when the interface struct is being deallocated, make sure the pointer is set to null regardless of the other fields' values in wifi struct. --- plugins/wifi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/plugins/wifi.c b/plugins/wifi.c index 45d88b8..d18dc6c 100644 --- a/plugins/wifi.c +++ b/plugins/wifi.c @@ -2284,6 +2284,9 @@ static void interface_removed(GSupplicantInterface *interface) wifi = g_supplicant_interface_get_data(interface); + if (wifi) + wifi->interface = NULL; + if (wifi && wifi->tethering) return; @@ -2292,7 +2295,6 @@ static void interface_removed(GSupplicantInterface *interface) return; } - wifi->interface = NULL; connman_device_set_powered(wifi->device, false); check_p2p_technology(); -- 1.9.1 _______________________________________________ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman