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:
Felix Fietkau 2024-05-01 18:55:24 +02:00 committed by sinavir
parent f2302cddf2
commit 772b9986a1
No known key found for this signature in database

View file

@ -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;