From: Andrea Bolognani Date: Tue, 24 Jan 2023 18:38:37 +0000 (+0100) Subject: qemu: Clear os.firmwareFeatures after autoselection X-Git-Tag: v9.2.0-rc1~257 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4c3e4f39f8f42cd3cb0ce01cc7859ebf91c78e2;p=thirdparty%2Flibvirt.git qemu: Clear os.firmwareFeatures after autoselection We already clear os.firmware, so it doesn't make sense to keep the list of features around. Moreover, our validation routines will reject an XML that contains a list of firmware features but disables firmware autoselection, so not clearing these means that the live XML for a domain that uses feature-based autoselection can't be fed back into libvirt. Signed-off-by: Andrea Bolognani Reviewed-by: Michal Privoznik --- diff --git a/src/qemu/qemu_firmware.c b/src/qemu/qemu_firmware.c index 175a4db21d..572172bc75 100644 --- a/src/qemu/qemu_firmware.c +++ b/src/qemu/qemu_firmware.c @@ -1454,6 +1454,7 @@ qemuFirmwareFillDomain(virQEMUDriver *driver, goto cleanup; def->os.firmware = VIR_DOMAIN_OS_DEF_FIRMWARE_NONE; + VIR_FREE(def->os.firmwareFeatures); ret = 0; cleanup: