mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
libvirt-admin: do not crash on URI without a scheme
(cherry picked from commit 7f35b6b658
)
This commit is contained in:
parent
c38669e15b
commit
efc74757d1
@ -121,10 +121,10 @@ getSocketPath(virURIPtr uri)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!sock_path) {
|
if (!sock_path) {
|
||||||
if (STRNEQ(uri->scheme, "libvirtd")) {
|
if (STRNEQ_NULLABLE(uri->scheme, "libvirtd")) {
|
||||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||||
_("Unsupported URI scheme '%s'"),
|
_("Unsupported URI scheme '%s'"),
|
||||||
uri->scheme);
|
NULLSTR(uri->scheme));
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
if (STREQ_NULLABLE(uri->path, "/system")) {
|
if (STREQ_NULLABLE(uri->path, "/system")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user