libvirt-admin: do not crash on URI without a scheme

This commit is contained in:
Ján Tomko 2016-04-06 10:43:39 +02:00
parent 0855ef47dd
commit 7f35b6b658

View File

@ -121,10 +121,10 @@ getSocketPath(virURIPtr uri)
}
if (!sock_path) {
if (STRNEQ(uri->scheme, "libvirtd")) {
if (STRNEQ_NULLABLE(uri->scheme, "libvirtd")) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unsupported URI scheme '%s'"),
uri->scheme);
NULLSTR(uri->scheme));
goto error;
}
if (STREQ_NULLABLE(uri->path, "/system")) {