Initialize wpa_ie_len to 0 if WPA IE is not set on all paths

The new WPS code was not setting this in error case.
This commit is contained in:
Jouni Malinen 2009-01-02 21:50:22 +02:00
parent 862e08a9a4
commit 243869858a

View file

@ -1027,7 +1027,8 @@ void wpa_supplicant_associate(struct wpa_supplicant *wpa_s,
if (wps_ie && wpabuf_len(wps_ie) <= sizeof(wpa_ie)) {
wpa_ie_len = wpabuf_len(wps_ie);
os_memcpy(wpa_ie, wpabuf_head(wps_ie), wpa_ie_len);
}
} else
wpa_ie_len = 0;
wpabuf_free(wps_ie);
wpa_supplicant_set_non_wpa_policy(wpa_s, ssid);
#endif /* CONFIG_WPS */