diff options
author | Jouni Malinen <j@w1.fi> | 2009-11-15 22:52:17 +0200 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2009-11-15 22:52:17 +0200 |
commit | a6b63078539d305d958c65a1f284bd20b8a938d7 (patch) | |
tree | 75f3c8e5537d4505a2da20badb5d119163731dea /wpa_supplicant/wps_supplicant.c | |
parent | cef4652f2c1f3a2562d29076d473b4307a3b9e01 (diff) | |
download | external_wpa_supplicant_8_ti-a6b63078539d305d958c65a1f284bd20b8a938d7.zip external_wpa_supplicant_8_ti-a6b63078539d305d958c65a1f284bd20b8a938d7.tar.gz external_wpa_supplicant_8_ti-a6b63078539d305d958c65a1f284bd20b8a938d7.tar.bz2 |
WPS ER: Deinit ER before WPS registrar/context
ER code may still touch WPS registrar/context during deinit, so better
do that before freeing the other WPS components.
Diffstat (limited to 'wpa_supplicant/wps_supplicant.c')
-rw-r--r-- | wpa_supplicant/wps_supplicant.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/wpa_supplicant/wps_supplicant.c b/wpa_supplicant/wps_supplicant.c index bc54c0d..5f1a3c6 100644 --- a/wpa_supplicant/wps_supplicant.c +++ b/wpa_supplicant/wps_supplicant.c @@ -898,6 +898,11 @@ void wpas_wps_deinit(struct wpa_supplicant *wpa_s) if (wpa_s->wps == NULL) return; +#ifdef CONFIG_WPS_ER + wps_er_deinit(wpa_s->wps_er); + wpa_s->wps_er = NULL; +#endif /* CONFIG_WPS_ER */ + wps_registrar_deinit(wpa_s->wps->registrar); wpabuf_free(wpa_s->wps->dh_pubkey); wpabuf_free(wpa_s->wps->dh_privkey); @@ -906,11 +911,6 @@ void wpas_wps_deinit(struct wpa_supplicant *wpa_s) os_free(wpa_s->wps->network_key); os_free(wpa_s->wps); wpa_s->wps = NULL; - -#ifdef CONFIG_WPS_ER - wps_er_deinit(wpa_s->wps_er); - wpa_s->wps_er = NULL; -#endif /* CONFIG_WPS_ER */ } |