Fix driver initialization not to crash if driver does not use init2()
8a5ab9f5e5
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
1 changed files with 2 additions and 2 deletions
|
@ -2166,6 +2166,8 @@ struct wpa_supplicant * wpa_supplicant_add_iface(struct wpa_global *global,
|
||||||
if (wpa_s == NULL)
|
if (wpa_s == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
wpa_s->global = global;
|
||||||
|
|
||||||
t_iface = *iface;
|
t_iface = *iface;
|
||||||
if (global->params.override_driver) {
|
if (global->params.override_driver) {
|
||||||
wpa_printf(MSG_DEBUG, "Override interface parameter: 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;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
wpa_s->global = global;
|
|
||||||
|
|
||||||
/* Notify the control interfaces about new iface */
|
/* Notify the control interfaces about new iface */
|
||||||
if (wpas_notify_iface_added(wpa_s)) {
|
if (wpas_notify_iface_added(wpa_s)) {
|
||||||
wpa_supplicant_deinit_iface(wpa_s);
|
wpa_supplicant_deinit_iface(wpa_s);
|
||||||
|
|
Loading…
Reference in a new issue