static void crypt_set_null_type(struct crypt_device *cd)
{
	if (!cd->type)
		return;

	free(cd->type);
	cd->type = NULL;
	cd->u.none.active_name = NULL;
	cd->data_offset = 0;
	cd->metadata_size = 0;
	cd->keyslots_size = 0;
}
static void crypt_set_null_type(struct crypt_device *cd)
{
	if (!cd->type)
		return;

	free(cd->type);
	cd->type = NULL;
	cd->u.none.active_name = NULL;
	cd->data_offset = 0;
	cd->metadata_size = 0;
	cd->keyslots_size = 0;
}