aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/notify.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2011-10-20 18:10:22 (GMT)
committerJouni Malinen <j@w1.fi>2011-10-20 18:10:22 (GMT)
commit8c0d3b4fc668f857af39efdb69f8a6acf580bde1 (patch)
treea13ab7d8afee492f29c6098b1867cf20d381206a /wpa_supplicant/notify.c
parent40442f5b48691ca1e8fd876f962765337fbd948b (diff)
downloadhostap-8c0d3b4fc668f857af39efdb69f8a6acf580bde1.zip
hostap-8c0d3b4fc668f857af39efdb69f8a6acf580bde1.tar.gz
hostap-8c0d3b4fc668f857af39efdb69f8a6acf580bde1.tar.bz2
Fix segfault on error path if driver initialization fails
wpa_s->wpa is NULL in this case and we better not call WPA state machine functions.
Diffstat (limited to 'wpa_supplicant/notify.c')
-rw-r--r--wpa_supplicant/notify.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/wpa_supplicant/notify.c b/wpa_supplicant/notify.c
index ed466bd..75b9acf 100644
--- a/wpa_supplicant/notify.c
+++ b/wpa_supplicant/notify.c
@@ -239,7 +239,8 @@ void wpas_notify_persistent_group_removed(struct wpa_supplicant *wpa_s,
void wpas_notify_network_removed(struct wpa_supplicant *wpa_s,
struct wpa_ssid *ssid)
{
- wpa_sm_pmksa_cache_flush(wpa_s->wpa, ssid);
+ if (wpa_s->wpa)
+ wpa_sm_pmksa_cache_flush(wpa_s->wpa, ssid);
if (wpa_s->global->p2p_group_formation != wpa_s)
wpas_dbus_unregister_network(wpa_s, ssid->id);
}