[PATCH 3/3] libvirt-admin: do not crash on URI without a scheme

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 src/libvirt-admin.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/libvirt-admin.c b/src/libvirt-admin.c
index 54af90c..6577c87 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")) {
-- 
2.4.10

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]