diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2011-07-19 19:32:51 +0200 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2011-08-04 13:32:25 +0100 |
commit | f08c5308cacda84ab811b85c3cf37ef59383c8c5 (patch) | |
tree | b3d48438d00191b0ca754bdb7b4c9ef5bf0a7d5f /src | |
parent | 1002a220a4e6b7083d0a9bc7dbef64799ae5b496 (diff) |
Return if xmlParseURI() failed, instead of crashing
Diffstat (limited to 'src')
-rw-r--r-- | src/virt-viewer-util.c | 2 |
1 files changed, 2 insertions, 0 deletions
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"); |