[PATCH v2 6/9] qemu_migration_cookie: Make cookie parsing robust against missing domain job

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

 



In testing code we don't properly populate the job sometimes. If it
isn't populated we should not touch it though in the migration cookie
code.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_migration_cookie.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c
index 9ede125cfd..cebd66a5d7 100644
--- a/src/qemu/qemu_migration_cookie.c
+++ b/src/qemu/qemu_migration_cookie.c
@@ -1429,7 +1429,7 @@ qemuMigrationCookieParse(virQEMUDriverPtr driver,
         }
     }

-    if (flags & QEMU_MIGRATION_COOKIE_STATS && mig->jobInfo)
+    if (flags & QEMU_MIGRATION_COOKIE_STATS && mig->jobInfo && priv->job.current)
         mig->jobInfo->operation = priv->job.current->operation;

     return g_steal_pointer(&mig);
-- 
2.26.2




[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]

  Powered by Linux