mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
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:
parent
a26669d753
commit
44a96fe914
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user