]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Check usage count of qemu:override node
authorJustin Gatzen <justin.gatzen@gmail.com>
Thu, 21 Apr 2022 01:48:03 +0000 (21:48 -0400)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 21 Apr 2022 09:09:54 +0000 (11:09 +0200)
When <qemu:override> is the only usage of the qemu namespace the entire
section is mistakenly removed. Add check for use count.

Signed-off-by: Justin Gatzen <justin.gatzen@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_domain.c

index 95134a3570b66a51da077684bb9f6b695ebd5563..00c209313b1bb426228ecc2f7a5c81f026eeef96 100644 (file)
@@ -3514,7 +3514,8 @@ qemuDomainDefNamespaceParse(xmlXPathContextPtr ctxt,
 
     if (nsdata->args || nsdata->num_env > 0 ||
         nsdata->capsadd || nsdata->capsdel ||
-        nsdata->deprecationBehavior)
+        nsdata->deprecationBehavior ||
+        nsdata->ndeviceOverride > 0)
         *data = g_steal_pointer(&nsdata);
 
     ret = 0;