EAP: Call deinit_for_reauth() for Phase 2 EAP methods
EAP-TTLS/PEAP/FAST were previously doing this for init_for_reauth(), but not for deinit_for_reauth(). Add the deinit_for_reauth() call as well to cover cases like EAP-AKA cleaup of AT_CHECKCODE data. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
02156b98b7
commit
76aa318381
3 changed files with 12 additions and 0 deletions
|
@ -1678,6 +1678,10 @@ static Boolean eap_fast_has_reauth_data(struct eap_sm *sm, void *priv)
|
||||||
static void eap_fast_deinit_for_reauth(struct eap_sm *sm, void *priv)
|
static void eap_fast_deinit_for_reauth(struct eap_sm *sm, void *priv)
|
||||||
{
|
{
|
||||||
struct eap_fast_data *data = priv;
|
struct eap_fast_data *data = priv;
|
||||||
|
|
||||||
|
if (data->phase2_priv && data->phase2_method &&
|
||||||
|
data->phase2_method->deinit_for_reauth)
|
||||||
|
data->phase2_method->deinit_for_reauth(sm, data->phase2_priv);
|
||||||
os_free(data->key_block_p);
|
os_free(data->key_block_p);
|
||||||
data->key_block_p = NULL;
|
data->key_block_p = NULL;
|
||||||
wpabuf_free(data->pending_phase2_req);
|
wpabuf_free(data->pending_phase2_req);
|
||||||
|
|
|
@ -1164,6 +1164,10 @@ static Boolean eap_peap_has_reauth_data(struct eap_sm *sm, void *priv)
|
||||||
static void eap_peap_deinit_for_reauth(struct eap_sm *sm, void *priv)
|
static void eap_peap_deinit_for_reauth(struct eap_sm *sm, void *priv)
|
||||||
{
|
{
|
||||||
struct eap_peap_data *data = priv;
|
struct eap_peap_data *data = priv;
|
||||||
|
|
||||||
|
if (data->phase2_priv && data->phase2_method &&
|
||||||
|
data->phase2_method->deinit_for_reauth)
|
||||||
|
data->phase2_method->deinit_for_reauth(sm, data->phase2_priv);
|
||||||
wpabuf_free(data->pending_phase2_req);
|
wpabuf_free(data->pending_phase2_req);
|
||||||
data->pending_phase2_req = NULL;
|
data->pending_phase2_req = NULL;
|
||||||
wpabuf_free(data->pending_resp);
|
wpabuf_free(data->pending_resp);
|
||||||
|
|
|
@ -1650,6 +1650,10 @@ static Boolean eap_ttls_has_reauth_data(struct eap_sm *sm, void *priv)
|
||||||
static void eap_ttls_deinit_for_reauth(struct eap_sm *sm, void *priv)
|
static void eap_ttls_deinit_for_reauth(struct eap_sm *sm, void *priv)
|
||||||
{
|
{
|
||||||
struct eap_ttls_data *data = priv;
|
struct eap_ttls_data *data = priv;
|
||||||
|
|
||||||
|
if (data->phase2_priv && data->phase2_method &&
|
||||||
|
data->phase2_method->deinit_for_reauth)
|
||||||
|
data->phase2_method->deinit_for_reauth(sm, data->phase2_priv);
|
||||||
wpabuf_free(data->pending_phase2_req);
|
wpabuf_free(data->pending_phase2_req);
|
||||||
data->pending_phase2_req = NULL;
|
data->pending_phase2_req = NULL;
|
||||||
wpabuf_free(data->pending_resp);
|
wpabuf_free(data->pending_resp);
|
||||||
|
|
Loading…
Reference in a new issue