finish_iterating (P11KitIter *iter,
                  CK_RV rv)
{
	finish_object (iter);
	finish_slot (iter);
	finish_module (iter);
	p11_array_clear (iter->modules);

	iter->iterating = 0;
	iter->move_next_session_state = 0;
	iter->iter_next_state = 0;
	iter->kind = P11_KIT_ITER_KIND_UNKNOWN;
	return rv;
}
finish_iterating (P11KitIter *iter,
                  CK_RV rv)
{
	finish_object (iter);
	finish_slot (iter);
	finish_module (iter);
	p11_array_clear (iter->modules);

	iter->iterating = 0;
	iter->move_next_session_state = 0;
	iter->iter_next_state = 0;
	iter->kind = P11_KIT_ITER_KIND_UNKNOWN;
	return rv;
}