From: Alex Jia <ajia@xxxxxxxxxx> * src/qemu/qemu_migration.c: avoid dereferencing a pointer that might be null "vmdef" when calling virDomainSaveConfig. Signed-off-by: Alex Jia <ajia@xxxxxxxxxx> --- src/qemu/qemu_migration.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index d9f8d93..69ced88 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -2510,7 +2510,8 @@ qemuMigrationFinish(struct qemud_driver *driver, if (vm->persistent) newVM = 0; vm->persistent = 1; - vmdef = virDomainObjGetPersistentDef(driver->caps, vm); + if (!(vmdef = virDomainObjGetPersistentDef(driver->caps, vm))) + goto endjob; if (virDomainSaveConfig(driver->configDir, vmdef) < 0) { /* Hmpf. Migration was successful, but making it persistent * was not. If we report successful, then when this domain -- 1.7.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list