Check dconnuri is not null or we will catch nullpointer later. I hope this makes Coverity happy. Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@xxxxxxxxxxxxx> --- src/libvirt-domain.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 35dfa3f..b9e6ac9 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -4399,7 +4399,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, @@ -4471,7 +4473,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, -- 1.7.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list