From: Julio Faracco <jcfaracco@xxxxxxxxx> Function qemuMigrationEatCookie() calls qemuMigrationCookieXMLParseStr(), when qemuCaps is not set, function assumes priv as a NULL pointer. At the end, function tries to set job info operation to the same current job. But, if priv is NULL due to missing qemuCaps, code returns a Null Pointer Exception. This commit adds an extra check to verify it. Signed-off-by: Julio Faracco <jcfaracco@xxxxxxxxx> --- src/qemu/qemu_migration_cookie.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c index 25d3fecd74..945b640e2c 100644 --- a/src/qemu/qemu_migration_cookie.c +++ b/src/qemu/qemu_migration_cookie.c @@ -1538,7 +1538,8 @@ qemuMigrationEatCookie(virQEMUDriverPtr driver, } } - if (flags & QEMU_MIGRATION_COOKIE_STATS && mig->jobInfo) + if (flags & QEMU_MIGRATION_COOKIE_STATS && mig->jobInfo && + priv && priv->job.current) mig->jobInfo->operation = priv->job.current->operation; return mig; -- 2.20.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list