void __nist_unload_fsm() { transition_t *transition; osip_statemachine_t *statemachine = __nist_get_fsm(); for (transition = statemachine->transitions; transition != NULL; transition = statemachine->transitions) { REMOVE_ELEMENT(statemachine->transitions, transition); osip_free(transition); } osip_free(statemachine->transitions); osip_free(statemachine); }
void __nist_unload_fsm () { transition_t *transition; osip_statemachine_t *statemachine = __nist_get_fsm (); while (!osip_list_eol (statemachine->transitions, 0)) { transition = (transition_t *) osip_list_get (statemachine->transitions, 0); osip_list_remove (statemachine->transitions, 0); osip_free (transition); } osip_free (statemachine->transitions); osip_free (statemachine); }