diff -up wpa_supplicant-0.5.7/wpa_supplicant.c.global-iface-segfault-fix wpa_supplicant-0.5.7/wpa_supplicant.c --- wpa_supplicant-0.5.7/wpa_supplicant.c.global-iface-segfault-fix 2007-10-09 17:34:25.000000000 -0400 +++ wpa_supplicant-0.5.7/wpa_supplicant.c 2007-10-09 17:35:17.000000000 -0400 @@ -2352,7 +2352,8 @@ static void wpa_supplicant_deinit_iface( wpa_clear_keys(wpa_s, NULL); } - wpas_dbus_unregister_iface(wpa_s); + if (wpa_s->global) + wpas_dbus_unregister_iface(wpa_s); wpa_supplicant_cleanup(wpa_s);