In case eap_peer_tls_encrypt() fails in eap_ttls_process_decrypted(), free resp memory. Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
@@ -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);