mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
qemu: Fix possible segfault when migrating disks
Users can provide URI without a schema. https://bugzilla.redhat.com/show_bug.cgi?id=1638889 Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
2dd0fb492f
commit
5db1fc5602
@ -408,6 +408,11 @@ qemuMigrationDstStartNBDServer(virQEMUDriverPtr driver,
|
||||
if (!uri)
|
||||
return -1;
|
||||
|
||||
if (!uri->scheme) {
|
||||
virReportError(VIR_ERR_INVALID_ARG, _("No URI scheme specified: %s"), nbdURI);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (STREQ(uri->scheme, "tcp")) {
|
||||
server.transport = VIR_STORAGE_NET_HOST_TRANS_TCP;
|
||||
if (!uri->server || STREQ(uri->server, "")) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user