On Sat, Sep 21, 2019 at 13:55:22 -0300, jcfaracco@xxxxxxxxx wrote: > 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; Did you actually hit this somehow? If so, please provide a full backtrace as the problem lies somewhere else and it should be fixed in a different way. This would just hide incorrect usage of qemuMigrationEatCookie, in which case it's better to crash. Jirka -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list