mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-02-17 17:43:06 -05:00
Fix driver initialization not to crash if driver does not use init2()
8a5ab9f5e56cd2f5781c2d92f41495e60d544780 fixed global driver context for init2(), but it also broke driver initialization with driver wrappers that do not use init2().. Fix this by setting wpa_s->global before it gets dereferenced.
This commit is contained in:
parent
e0e14a7bc3
commit
d8222ae38c
@ -2166,6 +2166,8 @@ struct wpa_supplicant * wpa_supplicant_add_iface(struct wpa_global *global,
|
||||
if (wpa_s == NULL)
|
||||
return NULL;
|
||||
|
||||
wpa_s->global = global;
|
||||
|
||||
t_iface = *iface;
|
||||
if (global->params.override_driver) {
|
||||
wpa_printf(MSG_DEBUG, "Override interface parameter: driver "
|
||||
@ -2189,8 +2191,6 @@ struct wpa_supplicant * wpa_supplicant_add_iface(struct wpa_global *global,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
wpa_s->global = global;
|
||||
|
||||
/* Notify the control interfaces about new iface */
|
||||
if (wpas_notify_iface_added(wpa_s)) {
|
||||
wpa_supplicant_deinit_iface(wpa_s);
|
||||
|
Loading…
x
Reference in New Issue
Block a user