mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-02-19 18:43:03 -05:00
nl80211: Do not add interface to the global list in case of failure
This avoids leaving a freed interface on the global list in case driver initialization fails.
This commit is contained in:
parent
cd9fc7869a
commit
c4bb881743
@ -1816,8 +1816,6 @@ static void * wpa_driver_nl80211_init(void *ctx, const char *ifname,
|
||||
if (drv == NULL)
|
||||
return NULL;
|
||||
drv->global = global_priv;
|
||||
if (drv->global)
|
||||
dl_list_add(&drv->global->interfaces, &drv->list);
|
||||
drv->ctx = ctx;
|
||||
bss = &drv->first_bss;
|
||||
bss->drv = drv;
|
||||
@ -1867,6 +1865,9 @@ static void * wpa_driver_nl80211_init(void *ctx, const char *ifname,
|
||||
if (wpa_driver_nl80211_finish_drv_init(drv))
|
||||
goto failed;
|
||||
|
||||
if (drv->global)
|
||||
dl_list_add(&drv->global->interfaces, &drv->list);
|
||||
|
||||
return bss;
|
||||
|
||||
failed:
|
||||
|
Loading…
x
Reference in New Issue
Block a user