hostapd: fix crash regression triggered by mesh mode

Fixes: 60fb4c92b6 ("hostapd: add ubus reload")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
[daniel@makrotopia.org: polish commit message]
This commit is contained in:
Felix Fietkau 2019-12-05 00:01:28 +01:00 committed by Daniel Golle
parent 231dc26867
commit 4225b83a76

View File

@ -87,7 +87,7 @@
hapd->iconf = conf; hapd->iconf = conf;
hapd->conf = bss; hapd->conf = bss;
hapd->iface = hapd_iface; hapd->iface = hapd_iface;
+ if (bss->config_id) + if (bss && bss->config_id)
+ hapd->config_id = strdup(bss->config_id); + hapd->config_id = strdup(bss->config_id);
+ else + else
+ hapd->config_id = NULL; + hapd->config_id = NULL;