]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Clear os.firmwareFeatures after autoselection
authorAndrea Bolognani <abologna@redhat.com>
Tue, 24 Jan 2023 18:38:37 +0000 (19:38 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Fri, 3 Mar 2023 12:49:56 +0000 (13:49 +0100)
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 <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_firmware.c

index 175a4db21dd83d32153bad83814397f3984a96cb..572172bc75c9f7797802050eb37baa65784da52c 100644 (file)
@@ -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: