Ejemplo n.º 1
0
static void radius_server_session_free(struct radius_server_data *data,
				       struct radius_session *sess)
{
	eloop_cancel_timeout(radius_server_session_timeout, data, sess);
	free(sess->eapKeyData);
	free(sess->eapReqData);
	eap_sm_deinit(sess->eap);
	free(sess);
	data->num_sess--;
}
Ejemplo n.º 2
0
/**
 * eapol_sm_deinit - Deinitialize EAPOL state machine
 * @sm: Pointer to EAPOL state machine allocated with eapol_sm_init()
 *
 * Deinitialize and free EAPOL state machine.
 */
void eapol_sm_deinit(struct eapol_sm *sm)
{
	if (sm == NULL)
		return;
	eloop_cancel_timeout(eapol_sm_step_timeout, NULL, sm);
	eloop_cancel_timeout(eapol_port_timers_tick, NULL, sm);
	eap_sm_deinit(sm->eap);
	os_free(sm->last_rx_key);
	os_free(sm->eapReqData);
	os_free(sm->ctx);
	os_free(sm);
}
Ejemplo n.º 3
0
static void radius_server_session_free(struct radius_server_data *data,
				       struct radius_session *sess)
{
	eloop_cancel_timeout(radius_server_session_timeout, data, sess);
	VM_FREE(sess->eapKeyData);
	VM_FREE(sess->eapReqData);
	eap_sm_deinit(sess->eap);
	if (sess->last_msg) {
		radius_msg_free(sess->last_msg);
		VM_FREE(sess->last_msg);
	}
	VM_FREE(sess->last_from_addr);
	if (sess->last_reply) {
		radius_msg_free(sess->last_reply);
		VM_FREE(sess->last_reply);
	}
	VM_FREE(sess);
	data->num_sess--;
}