[PATCH 6/7] EAP: Fix possible memory leak in eap_ttls_process_decrypted()
Ilan Peer
ilan.peer
Sun Jan 18 17:44:38 PST 2015
From: Ben <ben.rosenfeld at intel.com>
In case that eap_peer_tls_encrypt() fails in
eap_ttls_process_decrypted(), free resp memory.
Signed-off-by: Ben Rosenfeld <ben.rosenfeld at intel.com>
---
src/eap_peer/eap_ttls.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/eap_peer/eap_ttls.c b/src/eap_peer/eap_ttls.c
index 6fbc27b..b5c028b 100644
--- a/src/eap_peer/eap_ttls.c
+++ b/src/eap_peer/eap_ttls.c
@@ -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);
--
1.8.3.2
More information about the Hostap
mailing list