map->vendors = vendor;
}
- out:
+ cleanup:
VIR_FREE(string);
return ret;
ret = -1;
ignore:
x86VendorFree(vendor);
- goto out;
+ goto cleanup;
}
map->features = feature;
}
- out:
+ cleanup:
ctxt->node = ctxt_node;
VIR_FREE(nodes);
VIR_FREE(str);
ignore:
x86FeatureFree(feature);
x86FeatureFree(migrate_blocker);
- goto out;
+ goto cleanup;
}
map->models = model;
}
- out:
+ cleanup:
VIR_FREE(vendor);
VIR_FREE(nodes);
return ret;
ignore:
x86ModelFree(model);
- goto out;
+ goto cleanup;
}
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("CPU model %s is not supported by hypervisor"),
preferred);
- goto out;
+ goto cleanup;
} else {
VIR_WARN("Preferred CPU model %s not allowed by"
" hypervisor; closest supported model will be"
}
if (!(cpuCandidate = x86DataToCPU(data, candidate, map)))
- goto out;
+ goto cleanup;
cpuCandidate->type = cpu->type;
if (candidate->vendor && cpuCandidate->vendor &&
if (cpuModel == NULL) {
virReportError(VIR_ERR_INTERNAL_ERROR,
"%s", _("Cannot find suitable CPU model for given data"));
- goto out;
+ goto cleanup;
}
/* Remove non-migratable features if requested
if (flags & VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES) {
if (!(copy = x86DataCopy(cpuData)) ||
!(features = x86DataFromCPUFeatures(cpuModel, map)))
- goto out;
+ goto cleanup;
x86DataSubtract(copy, features);
if (x86DataToCPUFeatures(cpuModel, VIR_CPU_FEATURE_REQUIRE,
copy, map) < 0)
- goto out;
+ goto cleanup;
}
cpu->model = cpuModel->model;
ret = 0;
- out:
+ cleanup:
virCPUDefFree(cpuModel);
virCPUx86DataFree(copy);
virCPUx86DataFree(features);