if (virXMLPropEnum(sevNode, "type", virDomainLaunchSecurityTypeFromString,
VIR_XML_PROP_NONZERO | VIR_XML_PROP_REQUIRED,
&def->sectype) < 0)
- goto error;
+ return NULL;
if (virXPathULongHex("string(./policy)", ctxt, &policy) < 0) {
virReportError(VIR_ERR_XML_ERROR, "%s",
_("failed to get launch security policy"));
- goto error;
+ return NULL;
}
/* the following attributes are platform dependent and if missing, we can
} else if (rc == -2) {
virReportError(VIR_ERR_XML_ERROR, "%s",
_("Invalid format for launch security cbitpos"));
- goto error;
+ return NULL;
}
rc = virXPathUInt("string(./reducedPhysBits)", ctxt,
virReportError(VIR_ERR_XML_ERROR, "%s",
_("Invalid format for launch security "
"reduced-phys-bits"));
- goto error;
+ return NULL;
}
def->policy = policy;
def->session = virXPathString("string(./session)", ctxt);
return g_steal_pointer(&def);
-
- error:
- return NULL;
}