Fix crash on NULL uri scheme

This commit is contained in:
Daniel P. Berrange 2008-11-20 14:33:59 +00:00
parent 714bef5b6a
commit d378791480
2 changed files with 6 additions and 0 deletions

View File

@ -1,3 +1,7 @@
Thu Nov 20 14:31:00 GMT 2008 Daniel Berrange <berrange@redhat.com>
* src/remote_internal.c: Avoid crash on NULL URI scheme
Wed Nov 19 16:51:00 GMT 2008 Daniel Berrange <berrange@redhat.com>
Add User Mode Linux driver

View File

@ -855,6 +855,7 @@ remoteOpen (virConnectPtr conn,
*/
if (conn->uri &&
!conn->uri->server &&
conn->uri->scheme &&
!strchr(conn->uri->scheme, '+')) {
DEBUG0("Auto-remote UNIX socket");
rflags |= VIR_DRV_OPEN_REMOTE_UNIX;
@ -869,6 +870,7 @@ remoteOpen (virConnectPtr conn,
if (conn->uri &&
!conn->uri->server &&
conn->uri->path &&
conn->uri->scheme &&
((strchr(conn->uri->scheme, '+') == 0)||
(strstr(conn->uri->scheme, "+unix") != NULL)) &&
STREQ(conn->uri->path, "/session") &&