mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-08 07:15:46 +00:00
xenapi: Check for NULL before accessing the scheme
This commit is contained in:
parent
2ed0b3f935
commit
2969eff86a
@ -88,7 +88,8 @@ xenapiOpen (virConnectPtr conn, virConnectAuthPtr auth, int flags ATTRIBUTE_UNUS
|
|||||||
char *password = NULL;
|
char *password = NULL;
|
||||||
struct _xenapiPrivate *privP = NULL;
|
struct _xenapiPrivate *privP = NULL;
|
||||||
|
|
||||||
if (STRCASENEQ(conn->uri->scheme, "XenAPI")) {
|
if (conn->uri == NULL || conn->uri->scheme == NULL ||
|
||||||
|
STRCASENEQ(conn->uri->scheme, "XenAPI")) {
|
||||||
return VIR_DRV_OPEN_DECLINED;
|
return VIR_DRV_OPEN_DECLINED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user