Fix ctrl_iface get-STA-MIB for WPS disabled case
The previous version would crash here on NULL pointer dereference if WPS was disabled.
This commit is contained in:
parent
e2f74005f5
commit
a042f8447d
1 changed files with 2 additions and 0 deletions
|
@ -894,5 +894,7 @@ static void hostapd_wps_upnp_deinit(struct hostapd_data *hapd)
|
|||
int hostapd_wps_get_mib_sta(struct hostapd_data *hapd, const u8 *addr,
|
||||
char *buf, size_t buflen)
|
||||
{
|
||||
if (hapd->wps == NULL)
|
||||
return 0;
|
||||
return wps_registrar_get_info(hapd->wps->registrar, addr, buf, buflen);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue