Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
21 lines
607 B
Diff
21 lines
607 B
Diff
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
|
|
@@ -485,7 +485,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;
|
|
|