From f08c5308cacda84ab811b85c3cf37ef59383c8c5 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Tue, 19 Jul 2011 19:32:51 +0200 Subject: Return if xmlParseURI() failed, instead of crashing --- src/virt-viewer-util.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/virt-viewer-util.c b/src/virt-viewer-util.c index f5c1a5b..69679e1 100644 --- a/src/virt-viewer-util.c +++ b/src/virt-viewer-util.c @@ -88,6 +88,8 @@ virt_viewer_util_extract_host(const char *uristr, uristr = "xen:///"; uri = xmlParseURI(uristr); + g_return_val_if_fail(uri != NULL, 1); + if (host) { if (!uri || !uri->server) *host = g_strdup("localhost"); -- cgit v1.2.3