mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-01-28 03:37:17 +01:00
hostapd: add missing NULL pointer check in uc_hostapd_iface_stop
Avoid crashing if the interface has already been removed Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
7354d17ff4
commit
4145ff4d8a
1 changed files with 3 additions and 0 deletions
|
|
@ -471,6 +471,9 @@ uc_hostapd_iface_stop(uc_vm_t *vm, size_t nargs)
|
|||
struct hostapd_iface *iface = uc_fn_thisval("hostapd.iface");
|
||||
int i;
|
||||
|
||||
if (!iface)
|
||||
return NULL;
|
||||
|
||||
switch (iface->state) {
|
||||
case HAPD_IFACE_ENABLED:
|
||||
case HAPD_IFACE_DISABLED:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue