Fix wpa_supplicant AP mode with WPS not to crash
Commit 3379a3a795
added a direct
iface->for_each_interface use without verification whether the
function is available. This works with hostapd, but not
wpa_supplicant (which crashes on segfault).
This commit is contained in:
parent
d9c8a7c44c
commit
0314e26a61
1 changed files with 2 additions and 0 deletions
|
@ -540,6 +540,8 @@ static int count_interface_cb(struct hostapd_iface *iface, void *ctx)
|
|||
static int interface_count(struct hostapd_iface *iface)
|
||||
{
|
||||
int count = 0;
|
||||
if (iface->for_each_interface == NULL)
|
||||
return 0;
|
||||
iface->for_each_interface(iface->interfaces, count_interface_cb,
|
||||
&count);
|
||||
return count;
|
||||
|
|
Loading…
Reference in a new issue