diff --git a/servers/slapd/slapi/slapi_utils.c b/servers/slapd/slapi/slapi_utils.c index d24be09b82..928a5e507b 100644 --- a/servers/slapd/slapi/slapi_utils.c +++ b/servers/slapd/slapi/slapi_utils.c @@ -3234,6 +3234,8 @@ LDAP *slapi_ldap_init( char *ldaphost, int ldapport, int secure, int shared ) if ( rc > 0 && rc < size ) { rc = ldap_initialize( &ld, url ); + } else { + ld = NULL; } slapi_ch_free_string( &url );