fsm: release device references on free