Fix a segfault in wpa_supplicant_deinit
If wpa_supplicant is started with -u but the DBus service is already registered wpa_supplicant will bail out. However, it will segfault in wpa_supplicant_deinit because global->drv_priv wasn't allocated yet. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
This commit is contained in:
parent
421b4ba50a
commit
81e59f1070
1 changed files with 1 additions and 1 deletions
|
@ -2199,7 +2199,7 @@ void wpa_supplicant_deinit(struct wpa_global *global)
|
|||
|
||||
eap_peer_unregister_methods();
|
||||
|
||||
for (i = 0; wpa_supplicant_drivers[i]; i++) {
|
||||
for (i = 0; wpa_supplicant_drivers[i] && global->drv_priv; i++) {
|
||||
if (!global->drv_priv[i])
|
||||
continue;
|
||||
wpa_supplicant_drivers[i]->global_deinit(global->drv_priv[i]);
|
||||
|
|
Loading…
Reference in a new issue