From d689317ddbf58487432951a4afb2f4070eeb10b6 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 6 Feb 2016 16:31:28 +0200 Subject: [PATCH] EAPOL auth: Move radius_cui/identity freeing to eapol_auth_free() These can get allocated within eapol_auth_alloc(), so it is more logical to free them in eapol_auth_free() instead of ieee802_1x_free_station() that ends up calling eapol_auth_free(). Signed-off-by: Jouni Malinen --- src/ap/ieee802_1x.c | 2 -- src/eapol_auth/eapol_auth_sm.c | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ap/ieee802_1x.c b/src/ap/ieee802_1x.c index 607f94187..d09267a33 100644 --- a/src/ap/ieee802_1x.c +++ b/src/ap/ieee802_1x.c @@ -1165,10 +1165,8 @@ void ieee802_1x_free_station(struct hostapd_data *hapd, struct sta_info *sta) #ifndef CONFIG_NO_RADIUS radius_msg_free(sm->last_recv_radius); radius_free_class(&sm->radius_class); - wpabuf_free(sm->radius_cui); #endif /* CONFIG_NO_RADIUS */ - os_free(sm->identity); eapol_auth_free(sm); } diff --git a/src/eapol_auth/eapol_auth_sm.c b/src/eapol_auth/eapol_auth_sm.c index ff33d2862..cdbec4ee2 100644 --- a/src/eapol_auth/eapol_auth_sm.c +++ b/src/eapol_auth/eapol_auth_sm.c @@ -884,6 +884,9 @@ void eapol_auth_free(struct eapol_state_machine *sm) eloop_cancel_timeout(eapol_sm_step_cb, sm, NULL); if (sm->eap) eap_server_sm_deinit(sm->eap); + + wpabuf_free(sm->radius_cui); + os_free(sm->identity); os_free(sm); } -- 2.47.2