]> xenbits.xensource.com Git - libvirt.git/commitdiff
libvirt-admin: do not crash on URI without a scheme
authorJán Tomko <jtomko@redhat.com>
Wed, 6 Apr 2016 08:43:39 +0000 (10:43 +0200)
committerJán Tomko <jtomko@redhat.com>
Wed, 6 Apr 2016 12:47:41 +0000 (14:47 +0200)
src/libvirt-admin.c

index 54af90cc918fe4045701cd7ebad7b3ce75542ee5..6577c876937b61f67c110fef9a9b44e550fa4d16 100644 (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")) {