AP: add missing null pointer check in hostapd_free_hapd_data
When called from wpa_supplicant, iface->interfaces can be NULL Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
f2302cddf2
commit
772b9986a1
1 changed files with 1 additions and 1 deletions
|
@ -485,7 +485,7 @@ void hostapd_free_hapd_data(struct hostapd_data *hapd)
|
||||||
struct hapd_interfaces *ifaces = hapd->iface->interfaces;
|
struct hapd_interfaces *ifaces = hapd->iface->interfaces;
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
for (i = 0; i < ifaces->count; i++) {
|
for (i = 0; ifaces && i < ifaces->count; i++) {
|
||||||
struct hostapd_iface *iface = ifaces->iface[i];
|
struct hostapd_iface *iface = ifaces->iface[i];
|
||||||
size_t j;
|
size_t j;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue