EAP: Fix possible memory leak in eap_ttls_process_decrypted()

In case eap_peer_tls_encrypt() fails in eap_ttls_process_decrypted(),
free resp memory.

Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
This commit is contained in:
Ben 2015-01-18 20:44:38 -05:00 committed by Jouni Malinen
parent b760e64276
commit 9bd0273931

View file

@ -995,6 +995,7 @@ static int eap_ttls_encrypt_response(struct eap_sm *sm,
resp, out_data)) {
wpa_printf(MSG_INFO, "EAP-TTLS: Failed to encrypt a Phase 2 "
"frame");
wpabuf_free(resp);
return -1;
}
wpabuf_free(resp);