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.
This commit is contained in:
parent
cef4652f2c
commit
a6b6307853
1 changed files with 5 additions and 5 deletions
|
@ -898,6 +898,11 @@ void wpas_wps_deinit(struct wpa_supplicant *wpa_s)
|
||||||
if (wpa_s->wps == NULL)
|
if (wpa_s->wps == NULL)
|
||||||
return;
|
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);
|
wps_registrar_deinit(wpa_s->wps->registrar);
|
||||||
wpabuf_free(wpa_s->wps->dh_pubkey);
|
wpabuf_free(wpa_s->wps->dh_pubkey);
|
||||||
wpabuf_free(wpa_s->wps->dh_privkey);
|
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->network_key);
|
||||||
os_free(wpa_s->wps);
|
os_free(wpa_s->wps);
|
||||||
wpa_s->wps = NULL;
|
wpa_s->wps = NULL;
|
||||||
|
|
||||||
#ifdef CONFIG_WPS_ER
|
|
||||||
wps_er_deinit(wpa_s->wps_er);
|
|
||||||
wpa_s->wps_er = NULL;
|
|
||||||
#endif /* CONFIG_WPS_ER */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue