mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
virDomainFeaturesHyperVDefParse: Don't overwrite hypervisor vendor_id
In case when the user specifies the '<hyperv/>' feature multiple times we could overwrite already parsed data. Clear it beforehand. As before this isn't trying to address the case of features being specified multiple times not making much sense. Closes: https://gitlab.com/libvirt/libvirt/-/issues/675 Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
8e28f2c5c2
commit
574769ceb6
@ -16621,6 +16621,8 @@ virDomainFeaturesHyperVDefParse(virDomainDef *def,
|
||||
if (value != VIR_TRISTATE_SWITCH_ON)
|
||||
break;
|
||||
|
||||
g_clear_pointer(&def->hyperv_vendor_id, g_free);
|
||||
|
||||
if (!(def->hyperv_vendor_id = virXMLPropString(node, "value"))) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("missing 'value' attribute for HyperV feature 'vendor_id'"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user