From 61be1d55d3758e3f082e6b3ca12d7fb038d0b443 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 18 Nov 2009 22:37:02 +0000 Subject: [PATCH] More for prev commit - only set if URL was provided. (should URL be mandatory?) --- libraries/libldap/open.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 */ -- 2.39.5