WPS: Check malloc success on workaround path
ssid->ssid could be NULL here if malloc failed, so better check that consistently.
This commit is contained in:
parent
21fe9e757e
commit
d87e90b646
1 changed files with 2 additions and 0 deletions
|
@ -127,6 +127,8 @@ static void wpas_wps_security_workaround(struct wpa_supplicant *wpa_s,
|
||||||
if (wpa_drv_get_capa(wpa_s, &capa))
|
if (wpa_drv_get_capa(wpa_s, &capa))
|
||||||
return; /* Unknown what driver supports */
|
return; /* Unknown what driver supports */
|
||||||
|
|
||||||
|
if (ssid->ssid == NULL)
|
||||||
|
return;
|
||||||
bss = wpa_bss_get(wpa_s, cred->mac_addr, ssid->ssid, ssid->ssid_len);
|
bss = wpa_bss_get(wpa_s, cred->mac_addr, ssid->ssid, ssid->ssid_len);
|
||||||
if (bss == NULL) {
|
if (bss == NULL) {
|
||||||
wpa_printf(MSG_DEBUG, "WPS: The AP was not found from BSS "
|
wpa_printf(MSG_DEBUG, "WPS: The AP was not found from BSS "
|
||||||
|
|
Loading…
Reference in a new issue