From: Howard Chu Date: Wed, 18 Nov 2009 22:37:02 +0000 (+0000) Subject: More for prev commit - only set if URL was provided. X-Git-Tag: ACLCHECK_0~100 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=61be1d55d3758e3f082e6b3ca12d7fb038d0b443;p=openldap More for prev commit - only set if URL was provided. (should URL be mandatory?) --- diff --git a/libraries/libldap/open.c b/libraries/libldap/open.c index 85a22be4fc..8b6942d31b 100644 --- a/libraries/libldap/open.c +++ b/libraries/libldap/open.c @@ -271,7 +271,8 @@ ldap_init_fd( ldap_unbind_ext( ld, NULL, NULL ); return( LDAP_NO_MEMORY ); } - conn->lconn_server = ldap_url_dup( ld->ld_options.ldo_defludp ); + if( url ) + conn->lconn_server = ldap_url_dup( ld->ld_options.ldo_defludp ); ber_sockbuf_ctrl( conn->lconn_sb, LBER_SB_OPT_SET_FD, &fd ); ld->ld_defconn = conn; ++ld->ld_defconn->lconn_refcnt; /* so it never gets closed/freed */