]> xenbits.xensource.com Git - libvirt.git/commitdiff
virDomainMigrateUnmanagedParams: Don't blindly dereference @dconnuri
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 7 Jan 2016 10:39:45 +0000 (11:39 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Sat, 9 Jan 2016 17:44:44 +0000 (18:44 +0100)
This function may be called with @dconnuri == NULL, e.g. from
virDomainMigrateToURI3() if the flags are missing
VIR_MIGRATE_PEER2PEER flag. Moreover, all later functions called
from here do wrap it into NULLSTR() so why not do the same here?

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/libvirt-domain.c
src/qemu/qemu_migration.c

index 72908926ef5248d75d1435b7bfc194e3e7fd2bb2..677a9ad8de6fb6b12ac35abd2b56c9102f84a4d7 100644 (file)
@@ -3428,7 +3428,7 @@ virDomainMigrateUnmanagedParams(virDomainPtr domain,
                                 unsigned int flags)
 {
     VIR_DOMAIN_DEBUG(domain, "dconnuri=%s, params=%p, nparams=%d, flags=%x",
-                     dconnuri, params, nparams, flags);
+                     NULLSTR(dconnuri), params, nparams, flags);
     VIR_TYPED_PARAMS_DEBUG(params, nparams);
 
     if ((flags & VIR_MIGRATE_PEER2PEER) &&
index a07a316159695fcb01e41432a56981ccc041003d..51e7125280c75ceef60f873c9e9f9f1389b5719f 100644 (file)
@@ -5661,7 +5661,7 @@ qemuMigrationPerform(virQEMUDriverPtr driver,
                                              cookieout, cookieoutlen,
                                              flags, resource);
         } else {
-            return qemuMigrationPerformJob(driver, conn, vm, xmlin, dconnuri,
+            return qemuMigrationPerformJob(driver, conn, vm, xmlin, NULL,
                                            uri, graphicsuri, listenAddress,
                                            nmigrate_disks, migrate_disks,
                                            cookiein, cookieinlen,