blob: 85d5127f600d2de3fbbf1ef9c4d68cb4a8ae1eb0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
From: Felix Fietkau <nbd@nbd.name>
Date: Wed, 1 May 2024 18:55:24 +0200
Subject: [PATCH] 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>
---
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
@@ -502,7 +502,7 @@ void hostapd_free_hapd_data(struct hosta
struct hapd_interfaces *ifaces = hapd->iface->interfaces;
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];
size_t j;
|