[PATCH 1/5] wpa_supplicant: fix possible memory leak in handle_auth()

Ilan Peer ilan.peer at intel.com
Wed Jun 17 09:16:32 EDT 2015


From: Eytan Lifshitz <eytan.lifshitz at intel.com>

In handle_auth(), in case of waiting to external authentication,
the function returns without freeing allocated memory.

Signed-off-by: Eytan Lifshitz <eytan.lifshitz at intel.com>
---
 src/ap/ieee802_11.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index 8d2a066..6c826c7 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -975,6 +975,9 @@ static void handle_auth(struct hostapd_data *hapd,
 		/* Authentication code will re-send the authentication frame
 		 * after it has received (and cached) information from the
 		 * external source. */
+		os_free(identity);
+		os_free(radius_cui);
+		hostapd_free_psk_list(psk);
 		return;
 	}
 
-- 
1.9.1



More information about the HostAP mailing list