save sm_next in case state remove it self from the sub-statemachine list and free the vsfsm_t structure