mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 01:45:17 +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;
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user