From: Jouni Malinen Date: Sun, 18 Jul 2010 03:26:47 +0000 (-0700) Subject: Verify that l2_packet is initialized before notification call X-Git-Tag: hostap-1-bp~1257 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f967fe055cecf1f94c9ce43768b186b24ef4841;p=thirdparty%2Fhostap.git Verify that l2_packet is initialized before notification call It is possible that l2_packet is not used with wpa_supplicant in some cases, so better make sure we do not end up notifying l2_packet code about authentications unless it was actually initialized in the first place. --- diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index 93dfe59de..819c55710 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -1178,7 +1178,8 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s, wpa_supplicant_scard_init(wpa_s, wpa_s->current_ssid); } wpa_sm_notify_assoc(wpa_s->wpa, bssid); - l2_packet_notify_auth_start(wpa_s->l2); + if (wpa_s->l2) + l2_packet_notify_auth_start(wpa_s->l2); /* * Set portEnabled first to FALSE in order to get EAP state machine out