mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
xenapi: Check for NULL before accessing the scheme
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user