[PATCH] qemu: process: Avoid uninitialized use two vars when reconnecting to vm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



3ecebf07110ca8d3413072557f29137943e848e3 breaks the build as it adds a
way to jump to cleanup before the 'cfg' object is retrieved and 'priv'
is initialized.
---

Notes:
    Pushed under the build-breaker rule.

 src/qemu/qemu_process.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 310a08d..a14b6f7 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -3571,16 +3571,16 @@ qemuProcessReconnect(void *opaque)
      * deleted if qemuConnectMonitor() failed */
     virObjectRef(obj);

+    cfg = virQEMUDriverGetConfig(driver);
+    priv = obj->privateData;
+
     if (qemuDomainObjBeginJob(driver, obj, QEMU_JOB_MODIFY) < 0)
         goto killvm;

     virNWFilterReadLockFilterUpdates();

-    cfg = virQEMUDriverGetConfig(driver);
     VIR_DEBUG("Reconnect monitor to %p '%s'", obj, obj->def->name);

-    priv = obj->privateData;
-
     /* XXX check PID liveliness & EXE path */
     if (qemuConnectMonitor(driver, obj, QEMU_ASYNC_JOB_NONE, -1) < 0)
         goto error;
-- 
2.1.0

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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]