migration: check dconnuri in p2p mode

Check dconnuri is not null or we will catch nullpointer later.
I hope this makes Coverity happy.

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
This commit is contained in:
Nikolay Shirokovskiy 2015-10-02 10:52:52 +03:00 committed by Jiri Denemark
parent a26669d753
commit 44a96fe914

View File

@ -4398,7 +4398,9 @@ virDomainMigrateToURI2(virDomainPtr domain,
if (virDomainMigrateUnmanagedCheckCompat(domain, flags) < 0)
goto error;
if (!(flags & VIR_MIGRATE_PEER2PEER))
if (flags & VIR_MIGRATE_PEER2PEER)
virCheckNonNullArgGoto(dconnuri, error);
else
dconnuri = NULL;
if (virDomainMigrateUnmanaged(domain, NULL, flags,
@ -4470,7 +4472,9 @@ virDomainMigrateToURI3(virDomainPtr domain,
if (virDomainMigrateUnmanagedCheckCompat(domain, flags) < 0)
goto error;
if (!(flags & VIR_MIGRATE_PEER2PEER))
if (flags & VIR_MIGRATE_PEER2PEER)
virCheckNonNullArgGoto(dconnuri, error);
else
dconnuri = NULL;
if (virDomainMigrateUnmanagedParams(domain, dconnuri,