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

(cherry picked from commit 7f35b6b658)
This commit is contained in:
Ján Tomko 2016-04-06 10:43:39 +02:00 committed by Cole Robinson
parent c38669e15b
commit efc74757d1

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")) {