virDomainMigrateUnmanagedParams: Don't blindly dereference @dconnuri

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>
This commit is contained in:
Michal Privoznik 2016-01-07 11:39:45 +01:00
parent 8156493d8d
commit b7fac9f77f
2 changed files with 2 additions and 2 deletions

View File

@ -3428,7 +3428,7 @@ virDomainMigrateUnmanagedParams(virDomainPtr domain,
unsigned int flags) unsigned int flags)
{ {
VIR_DOMAIN_DEBUG(domain, "dconnuri=%s, params=%p, nparams=%d, flags=%x", 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); VIR_TYPED_PARAMS_DEBUG(params, nparams);
if ((flags & VIR_MIGRATE_PEER2PEER) && if ((flags & VIR_MIGRATE_PEER2PEER) &&

View File

@ -5661,7 +5661,7 @@ qemuMigrationPerform(virQEMUDriverPtr driver,
cookieout, cookieoutlen, cookieout, cookieoutlen,
flags, resource); flags, resource);
} else { } else {
return qemuMigrationPerformJob(driver, conn, vm, xmlin, dconnuri, return qemuMigrationPerformJob(driver, conn, vm, xmlin, NULL,
uri, graphicsuri, listenAddress, uri, graphicsuri, listenAddress,
nmigrate_disks, migrate_disks, nmigrate_disks, migrate_disks,
cookiein, cookieinlen, cookiein, cookieinlen,