]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
EAPOL auth: Move radius_cui/identity freeing to eapol_auth_free()
authorJouni Malinen <j@w1.fi>
Sat, 6 Feb 2016 14:31:28 +0000 (16:31 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 6 Feb 2016 14:32:22 +0000 (16:32 +0200)
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 <j@w1.fi>
src/ap/ieee802_1x.c
src/eapol_auth/eapol_auth_sm.c

index 607f941876b050d37c64e3a9fa2c365fafd5fbee..d09267a33383f27b03982cf2d2dbfd372017fe36 100644 (file)
@@ -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);
 }
 
index ff33d286223fd464de4bde68ed83f80099bce382..cdbec4ee20f604f2d8a88ce22cd19ca67a3dc6a1 100644 (file)
@@ -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);
 }