update fsm_release()
fix memory leak