[libvirt] [PATCH 2/5] qemuxml2xmltest: Move virObjectUnref() call

Michal Privoznik mprivozn at redhat.com
Mon Apr 1 14:04:34 UTC 2019


The current location looks very arbitrary. Move it to the end of
the mymain() function so it is less confusing.

Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
---
 tests/qemuxml2xmltest.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 83a0d1cf7b..87336484d1 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -1158,8 +1158,6 @@ mymain(void)
             QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM,
             QEMU_CAPS_VIRTIO_PCI_ATS);
 
-    virObjectUnref(cfg);
-
     DO_TEST("acpi-table", NONE);
 
     DO_TEST("video-device-pciaddr-default",
@@ -1297,6 +1295,7 @@ mymain(void)
     if (getenv("LIBVIRT_SKIP_CLEANUP") == NULL)
         virFileDeleteTree(fakerootdir);
 
+    virObjectUnref(cfg);
     qemuTestDriverFree(&driver);
     VIR_FREE(fakerootdir);
 
-- 
2.21.0




More information about the libvir-list mailing list