aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_peer
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2008-12-17 23:06:06 (GMT)
committerJouni Malinen <j@w1.fi>2008-12-17 23:06:06 (GMT)
commitf0477201bd57cc509535a14f822d0ab5e1b1651c (patch)
tree0a11d7e4c0d008b000c61f1fb2a57c5a8fddd75b /src/eap_peer
parent47f72245e2a574beede7b083c13ab6d30e05c31e (diff)
downloadhostap-06-f0477201bd57cc509535a14f822d0ab5e1b1651c.zip
hostap-06-f0477201bd57cc509535a14f822d0ab5e1b1651c.tar.gz
hostap-06-f0477201bd57cc509535a14f822d0ab5e1b1651c.tar.bz2
WPS: Fixed deinit code for freeing config and registrar data
We need to be a bit more careful when removing the WPS configuration block since wpa_s->current_ssid may still be pointing at it. In addition, registrar pointer in wps_context will need to be cleared since the context data is now maintained over multiple EAP-WSC runs. Without this, certain WPS operations could have used freed memory.
Diffstat (limited to 'src/eap_peer')
-rw-r--r--src/eap_peer/eap_wsc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/eap_peer/eap_wsc.c b/src/eap_peer/eap_wsc.c
index 7b8affc..a22c5d6 100644
--- a/src/eap_peer/eap_wsc.c
+++ b/src/eap_peer/eap_wsc.c
@@ -224,6 +224,7 @@ static void eap_wsc_deinit(struct eap_sm *sm, void *priv)
wpabuf_free(data->out_buf);
wps_deinit(data->wps);
wps_registrar_deinit(data->wps_ctx->registrar);
+ data->wps_ctx->registrar = NULL;
os_free(data->wps_ctx->network_key);
data->wps_ctx->network_key = NULL;
os_free(data);