ITS#5934 fix NULL pointer deref

This commit is contained in:
Howard Chu 2009-02-09 21:14:46 +00:00
parent 911b5fd42e
commit fbf42baefa

View file

@ -452,9 +452,9 @@ ldap_new_connection( LDAP *ld, LDAPURLDesc **srvlist, int use_ldsb,
ldap_pvt_thread_mutex_unlock( &ld->ld_conn_mutex );
#endif
if ( lc->lconn_server->lud_exts ) {
if ( connect ) {
#ifdef HAVE_TLS
if ( connect ) {
if ( lc->lconn_server->lud_exts ) {
int rc, ext = find_tls_ext( lc->lconn_server );
if ( ext ) {
LDAPConn *savedefconn;
@ -480,7 +480,6 @@ ldap_new_connection( LDAP *ld, LDAPURLDesc **srvlist, int use_ldsb,
return NULL;
}
}
}
#endif
}