From: Ján Tomko Date: Wed, 6 Apr 2016 08:43:39 +0000 (+0200) Subject: libvirt-admin: do not crash on URI without a scheme X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=7f35b6b658288749d41cb5ff138baf9f679e57fd;p=libvirt.git libvirt-admin: do not crash on URI without a scheme --- diff --git a/src/libvirt-admin.c b/src/libvirt-admin.c index 54af90cc91..6577c87693 100644 --- a/src/libvirt-admin.c +++ b/src/libvirt-admin.c @@ -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")) {