]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
EAP: Fix possible memory leak in eap_ttls_process_decrypted()
authorBen <ben.rosenfeld@intel.com>
Mon, 19 Jan 2015 01:44:38 +0000 (20:44 -0500)
committerJouni Malinen <j@w1.fi>
Tue, 20 Jan 2015 00:13:15 +0000 (02:13 +0200)
In case eap_peer_tls_encrypt() fails in eap_ttls_process_decrypted(),
free resp memory.

Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
src/eap_peer/eap_ttls.c

index 6fbc27b71fe15cfb94d39a469179b6ed13a6153a..b5c028b5276d587dcde9c1542c77f7a182f628a7 100644 (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);