1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Wed, 1 May 2024 18:55:24 +0200
3 Subject: [PATCH] AP: add missing null pointer check in hostapd_free_hapd_data
5 When called from wpa_supplicant, iface->interfaces can be NULL
7 Signed-off-by: Felix Fietkau <nbd@nbd.name>
10 --- a/src/ap/hostapd.c
11 +++ b/src/ap/hostapd.c
12 @@ -502,7 +502,7 @@ void hostapd_free_hapd_data(struct hosta
13 struct hapd_interfaces *ifaces = hapd->iface->interfaces;
16 - for (i = 0; i < ifaces->count; i++) {
17 + for (i = 0; ifaces && i < ifaces->count; i++) {
18 struct hostapd_iface *iface = ifaces->iface[i];