EAP-EKE server: Fix a memory leak on an error path
The allocated Response/Commit message was not freed if DH initialization failed. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
af052e6e11
commit
ae1fb64550
1 changed files with 1 additions and 0 deletions
|
@ -276,6 +276,7 @@ static struct wpabuf * eap_eke_build_commit(struct eap_sm *sm,
|
||||||
|
|
||||||
if (eap_eke_dh_init(data->sess.dhgroup, data->dh_priv, pub) < 0) {
|
if (eap_eke_dh_init(data->sess.dhgroup, data->dh_priv, pub) < 0) {
|
||||||
wpa_printf(MSG_INFO, "EAP-EKE: Failed to initialize DH");
|
wpa_printf(MSG_INFO, "EAP-EKE: Failed to initialize DH");
|
||||||
|
wpabuf_free(msg);
|
||||||
eap_eke_fail(data, EAP_EKE_FAIL_PRIVATE_INTERNAL_ERROR);
|
eap_eke_fail(data, EAP_EKE_FAIL_PRIVATE_INTERNAL_ERROR);
|
||||||
return eap_eke_build_failure(data, id);
|
return eap_eke_build_failure(data, id);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue