[PATCH] eap: Fix possible memory leak in eap_leap_process_request()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ilan Peer <ilan.peer@xxxxxxxxx>

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

Signed-off-by: Ilan Peer <ilan.peer@xxxxxxxxx>
---
 src/eap_peer/eap_leap.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/eap_peer/eap_leap.c b/src/eap_peer/eap_leap.c
index 7bb62e7..233b9ee 100644
--- a/src/eap_peer/eap_leap.c
+++ b/src/eap_peer/eap_leap.c
@@ -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);
-- 
1.9.1


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux