From: Howard Chu Date: Mon, 26 Mar 2012 10:32:11 +0000 (-0700) Subject: ITS#7207 check for ld->ld_defconn X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=dcf94e25f57c2f24936c3ce66d2350c391354da1;p=openldap ITS#7207 check for ld->ld_defconn --- diff --git a/libraries/libldap/cyrus.c b/libraries/libldap/cyrus.c index 0248101035..2475a87b13 100644 --- a/libraries/libldap/cyrus.c +++ b/libraries/libldap/cyrus.c @@ -419,7 +419,7 @@ ldap_int_sasl_bind( LDAP_MUTEX_LOCK( &ld->ld_conn_mutex ); ber_sockbuf_ctrl( ld->ld_sb, LBER_SB_OPT_GET_FD, &sd ); - if ( sd == AC_SOCKET_INVALID ) { + if ( sd == AC_SOCKET_INVALID || !ld->ld_defconn ) { /* not connected yet */ rc = ldap_open_defconn( ld );