---
 src/qemu/qemu_driver.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index a9cfde2..0f79dcd 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -10336,7 +10336,7 @@ qemuDomainGetSchedulerParametersFlags(virDomainPtr dom,
     bool cpu_bw_status = false;
     int saved_nparams = 0;
     virDomainDefPtr persistentDef;
-    virCapsPtr caps = NULL;
+    virDomainDefPtr def;
     qemuDomainObjPrivatePtr priv;

     virCheckFlags(VIR_DOMAIN_AFFECT_LIVE |
@@ -10363,14 +10363,10 @@ qemuDomainGetSchedulerParametersFlags(virDomainPtr 
dom,
     if (*nparams > 1)
         cpu_bw_status = virCgroupSupportsCpuBW(priv->cgroup);

-    if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
-        goto cleanup;
-
-    if (virDomainLiveConfigHelperMethod(caps, driver->xmlopt, vm, &flags,
-                                        &persistentDef) < 0)
+    if (virDomainObjGetDefs(vm, flags, &def, &persistentDef) < 0)
         goto cleanup;

-    if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
+    if (persistentDef) {
         shares = persistentDef->cputune.shares;
         if (*nparams > 1) {
             period = persistentDef->cputune.period;
@@ -10476,7 +10472,6 @@ qemuDomainGetSchedulerParametersFlags(virDomainPtr dom,

  cleanup:
     virDomainObjEndAPI(&vm);
-    virObjectUnref(caps);
     return ret;
 }

-- 
2.8.2

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to