xmlXPathContextPtr ctxt)
{
g_autofree xmlNodePtr *nodes = NULL;
- g_autofree char *tmp = NULL;
xmlNodePtr node = NULL;
int gic_version;
size_t i;
return -1;
for (i = 0; i < n; i++) {
+ g_autofree char *tmp = NULL;
int val = virDomainFeatureTypeFromString((const char *)nodes[i]->name);
if (val < 0) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
return -1;
}
def->apic_eoi = eoi;
- VIR_FREE(tmp);
}
G_GNUC_FALLTHROUGH;
case VIR_DOMAIN_FEATURE_ACPI:
tmp, virDomainFeatureTypeToString(val));
return -1;
}
- VIR_FREE(tmp);
} else {
def->features[val] = VIR_TRISTATE_SWITCH_ABSENT;
}
tmp, virDomainFeatureTypeToString(val));
return -1;
}
- VIR_FREE(tmp);
} else {
def->features[val] = VIR_TRISTATE_SWITCH_ON;
}
return -1;
}
def->gic_version = gic_version;
- VIR_FREE(tmp);
}
def->features[val] = VIR_TRISTATE_SWITCH_ON;
break;
return -1;
}
def->features[val] = value;
- VIR_FREE(tmp);
}
break;
return -1;
}
def->hpt_resizing = (virDomainHPTResizing) value;
- VIR_FREE(tmp);
}
if (virParseScaledValue("./features/hpt/maxpagesize",
return -1;
}
def->features[val] = value;
- VIR_FREE(tmp);
}
break;
return -1;
}
def->features[val] = value;
- VIR_FREE(tmp);
}
break;
return -1;
}
def->features[val] = value;
- VIR_FREE(tmp);
}
break;
tmp, virDomainFeatureTypeToString(val));
return -1;
}
- VIR_FREE(tmp);
break;
/* coverity[dead_error_begin] */
return -1;
for (i = 0; i < n; i++) {
+ g_autofree char *tmp = NULL;
feature = virDomainHypervTypeFromString((const char *)nodes[i]->name);
if (feature < 0) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
return -1;
}
- VIR_FREE(tmp);
def->hyperv_features[feature] = value;
switch ((virDomainHyperv) feature) {
return -1;
for (i = 0; i < n; i++) {
+ g_autofree char *tmp = NULL;
+
if (STRNEQ((const char *)nodes[i]->name, "direct")) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unsupported Hyper-V stimer feature: %s"),
return -1;
}
- VIR_FREE(tmp);
def->hyperv_stimer_direct = value;
}
VIR_FREE(nodes);
return -1;
for (i = 0; i < n; i++) {
+ g_autofree char *tmp = NULL;
+
feature = virDomainKVMTypeFromString((const char *)nodes[i]->name);
if (feature < 0) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
return -1;
}
- VIR_FREE(tmp);
def->kvm_features[feature] = value;
break;
int feature;
int value;
g_autofree char *ptval = NULL;
+ g_autofree char *tmp = NULL;
if ((n = virXPathNodeSet("./features/xen/*", ctxt, &nodes)) < 0)
return -1;
return -1;
}
- VIR_FREE(tmp);
def->xen_features[feature] = value;
switch ((virDomainXen) feature) {
}
if (def->features[VIR_DOMAIN_FEATURE_MSRS] == VIR_TRISTATE_SWITCH_ON) {
+ g_autofree char *tmp = NULL;
if ((node = virXPathNode("./features/msrs", ctxt)) == NULL)
return -1;
tmp);
return -1;
}
- VIR_FREE(tmp);
}
if ((n = virXPathNodeSet("./features/capabilities/*", ctxt, &nodes)) < 0)
return -1;
for (i = 0; i < n; i++) {
+ g_autofree char *tmp = NULL;
int val = virDomainProcessCapsFeatureTypeFromString((const char *)nodes[i]->name);
if (val < 0) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
tmp, virDomainProcessCapsFeatureTypeToString(val));
return -1;
}
- VIR_FREE(tmp);
} else {
def->caps_features[val] = VIR_TRISTATE_SWITCH_ON;
}