Check hapd_iface more consistently in hostapd_disable_iface()
There is no point in the hapd_iface == NULL validate after this pointer has been dereferences, so move the code dereferencing hapd_iface after the check. Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
207fb86411
commit
8cd93a01a9
1 changed files with 2 additions and 1 deletions
|
@ -1113,12 +1113,13 @@ int hostapd_reload_iface(struct hostapd_iface *hapd_iface)
|
||||||
int hostapd_disable_iface(struct hostapd_iface *hapd_iface)
|
int hostapd_disable_iface(struct hostapd_iface *hapd_iface)
|
||||||
{
|
{
|
||||||
size_t j;
|
size_t j;
|
||||||
struct hostapd_bss_config *bss = hapd_iface->bss[0]->conf;
|
struct hostapd_bss_config *bss;
|
||||||
const struct wpa_driver_ops *driver;
|
const struct wpa_driver_ops *driver;
|
||||||
void *drv_priv;
|
void *drv_priv;
|
||||||
|
|
||||||
if (hapd_iface == NULL)
|
if (hapd_iface == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
|
bss = hapd_iface->bss[0]->conf;
|
||||||
driver = hapd_iface->bss[0]->driver;
|
driver = hapd_iface->bss[0]->driver;
|
||||||
drv_priv = hapd_iface->bss[0]->drv_priv;
|
drv_priv = hapd_iface->bss[0]->drv_priv;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue