diff --git a/src/eap-mschapv2.c b/src/eap-mschapv2.c index 29475070..77fbc1bc 100644 --- a/src/eap-mschapv2.c +++ b/src/eap-mschapv2.c @@ -559,12 +559,13 @@ static void eap_mschapv2_handle_success(struct eap_state *eap, goto err; eap_method_success(eap); - /* The eapol set_key_material only needs msk, and that's all we got */ - eap_set_key_material(eap, session_key, 32, NULL, 0, NULL, 0); buffer[5] = MSCHAPV2_OP_SUCCESS; eap_send_response(eap, EAP_TYPE_MSCHAPV2, buffer, sizeof(buffer)); + /* The eapol set_key_material only needs msk, and that's all we got */ + eap_set_key_material(eap, session_key, 32, NULL, 0, NULL, 0); + return; err: