mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-28 19:41:16 +00:00
cpu_conf: Introduce virCPUDefFreeFeatures
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
b101101d09
commit
532fc7b773
@ -62,18 +62,27 @@ VIR_ENUM_IMPL(virCPUFeaturePolicy, VIR_CPU_FEATURE_LAST,
|
||||
"disable",
|
||||
"forbid")
|
||||
|
||||
void ATTRIBUTE_NONNULL(1)
|
||||
virCPUDefFreeModel(virCPUDefPtr def)
|
||||
void
|
||||
virCPUDefFreeFeatures(virCPUDefPtr def)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
VIR_FREE(def->model);
|
||||
VIR_FREE(def->vendor);
|
||||
VIR_FREE(def->vendor_id);
|
||||
|
||||
for (i = 0; i < def->nfeatures; i++)
|
||||
VIR_FREE(def->features[i].name);
|
||||
VIR_FREE(def->features);
|
||||
|
||||
def->nfeatures = def->nfeatures_max = 0;
|
||||
}
|
||||
|
||||
|
||||
void ATTRIBUTE_NONNULL(1)
|
||||
virCPUDefFreeModel(virCPUDefPtr def)
|
||||
{
|
||||
|
||||
VIR_FREE(def->model);
|
||||
VIR_FREE(def->vendor);
|
||||
VIR_FREE(def->vendor_id);
|
||||
virCPUDefFreeFeatures(def);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -124,6 +124,9 @@ struct _virCPUDef {
|
||||
};
|
||||
|
||||
|
||||
void ATTRIBUTE_NONNULL(1)
|
||||
virCPUDefFreeFeatures(virCPUDefPtr def);
|
||||
|
||||
void ATTRIBUTE_NONNULL(1)
|
||||
virCPUDefFreeModel(virCPUDefPtr def);
|
||||
|
||||
|
@ -75,6 +75,7 @@ virCPUDefCopyWithoutModel;
|
||||
virCPUDefFormat;
|
||||
virCPUDefFormatBuf;
|
||||
virCPUDefFree;
|
||||
virCPUDefFreeFeatures;
|
||||
virCPUDefFreeModel;
|
||||
virCPUDefParseXML;
|
||||
virCPUDefStealModel;
|
||||
|
Loading…
Reference in New Issue
Block a user