On 10/31/2014 09:17 AM, weiwei li wrote:
qemuMigrationCookiePtr mig->nbd may be null when MigrationCookie
do not have nbd information ,but nbd port did allocated before and
must be released here, so ignore mig->nbd null ptr and just warn.
StartNBDServer is only run when mig->nbd is present, so if it's not there we
didn't start the server or allocate the port. Are you sure this patch is
necessary?
Jan
Signed-off-by: Weiwei Li <nuonuoli(a)tencent.com
<mailto:nuonuoli@tencent.com>>
---
src/qemu/qemu_migration.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 0ad8054..134b041 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -1584,7 +1584,7 @@ qemuMigrationStopNBDServer(virQEMUDriverPtr driver,
qemuDomainObjPrivatePtr priv = vm->privateData;
if (!mig->nbd)
- return;
+ VIR_WARN("mig->nbd is null");
if (qemuDomainObjEnterMonitorAsync(driver, vm,
QEMU_ASYNC_JOB_MIGRATION_IN) < 0)