aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorHelmut Schaa <helmut.schaa@googlemail.com>2009-02-04 19:55:12 (GMT)
committerJouni Malinen <j@w1.fi>2009-02-08 10:30:20 (GMT)
commit2f84ebb40f81a700a29381158f6891058c389a09 (patch)
tree3e21938f235044973799651ffc2c6e3edea67d0b /wpa_supplicant
parent8910999fae357cfa35bb8a0f7b768a4026178fb0 (diff)
downloadhostap-06-2f84ebb40f81a700a29381158f6891058c389a09.zip
hostap-06-2f84ebb40f81a700a29381158f6891058c389a09.tar.gz
hostap-06-2f84ebb40f81a700a29381158f6891058c389a09.tar.bz2
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> (cherry picked from commit 81e59f1070f223c4b244a20aa496b79d9cdb5961)
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/wpa_supplicant.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index d2c4552..92789bb 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -2150,7 +2150,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]);