X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=hostapd%2Fieee802_1x.c;h=89a11f2de77ad00643ccb4f30a02eb8d144a8853;hb=9e7245bdb414dec167363b9178a37f4745afa595;hp=813ee5e52b4d044ee8af9c2f52895106af5ea62f;hpb=d94f86d85ef1a846ff91fe3c66b368c1d535352c;p=mech_eap.git diff --git a/hostapd/ieee802_1x.c b/hostapd/ieee802_1x.c index 813ee5e..89a11f2 100644 --- a/hostapd/ieee802_1x.c +++ b/hostapd/ieee802_1x.c @@ -562,7 +562,6 @@ static void ieee802_1x_encapsulate_radius(struct hostapd_data *hapd, fail: radius_msg_free(msg); - os_free(msg); } #endif /* CONFIG_NO_RADIUS */ @@ -926,10 +925,7 @@ void ieee802_1x_free_station(struct sta_info *sta) sta->eapol_sm = NULL; #ifndef CONFIG_NO_RADIUS - if (sm->last_recv_radius) { - radius_msg_free(sm->last_recv_radius); - os_free(sm->last_recv_radius); - } + radius_msg_free(sm->last_recv_radius); radius_free_class(&sm->radius_class); #endif /* CONFIG_NO_RADIUS */ @@ -1241,11 +1237,7 @@ ieee802_1x_receive_auth(struct radius_msg *msg, struct radius_msg *req, wpa_printf(MSG_DEBUG, "RADIUS packet matching with station " MACSTR, MAC2STR(sta->addr)); - if (sm->last_recv_radius) { - radius_msg_free(sm->last_recv_radius); - os_free(sm->last_recv_radius); - } - + radius_msg_free(sm->last_recv_radius); sm->last_recv_radius = msg; session_timeout_set = @@ -1368,11 +1360,8 @@ void ieee802_1x_abort_auth(struct hostapd_data *hapd, struct sta_info *sta) HOSTAPD_LEVEL_DEBUG, "aborting authentication"); #ifndef CONFIG_NO_RADIUS - if (sm->last_recv_radius) { - radius_msg_free(sm->last_recv_radius); - os_free(sm->last_recv_radius); - sm->last_recv_radius = NULL; - } + radius_msg_free(sm->last_recv_radius); + sm->last_recv_radius = NULL; #endif /* CONFIG_NO_RADIUS */ if (sm->eap_if->eapTimeout) {