From 7f35b6b658288749d41cb5ff138baf9f679e57fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Wed, 6 Apr 2016 10:43:39 +0200 Subject: [PATCH] libvirt-admin: do not crash on URI without a scheme --- 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 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")) {