EAP-LEAP: Fix possible memory leak in eap_leap_process_request()

Free 'resp' object in case of a failure to derive the response.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
This commit is contained in:
Ilan Peer 2017-06-08 11:17:57 +03:00 committed by Jouni Malinen
parent 23eead4d74
commit 96e595a9f1

View file

@ -120,6 +120,7 @@ static struct wpabuf * eap_leap_process_request(struct eap_sm *sm, void *priv,
nt_challenge_response(challenge, password, password_len, rpos))) {
wpa_printf(MSG_DEBUG, "EAP-LEAP: Failed to derive response");
ret->ignore = TRUE;
wpabuf_free(resp);
return NULL;
}
os_memcpy(data->peer_response, rpos, LEAP_RESPONSE_LEN);