From 69b1ecde25aef6545cc077fe3c92ba19f1623828 Mon Sep 17 00:00:00 2001 From: Jiri Denemark Date: Tue, 13 Aug 2019 17:02:32 +0200 Subject: [PATCH] qemu: Fix crash on incoming migration In the first stage of incoming migration (qemuMigrationDstPrepareAny) we call qemuMigrationEatCookie when there's no vm object created yet and thus we don't have any private data to pass. Broken by me in commit v5.6.0-109-gbf15b145ec. Signed-off-by: Jiri Denemark Reviewed-by: Erik Skultety --- 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 da5bc8d05f..25d3fecd74 100644 --- a/src/qemu/qemu_migration_cookie.c +++ b/src/qemu/qemu_migration_cookie.c @@ -1507,7 +1507,7 @@ qemuMigrationEatCookie(virQEMUDriverPtr driver, if (cookiein && cookieinlen && qemuMigrationCookieXMLParseStr(mig, driver, - priv->qemuCaps, + priv ? priv->qemuCaps : NULL, cookiein, flags) < 0) goto error;