From: Howard Chu Date: Mon, 9 Feb 2009 21:14:46 +0000 (+0000) Subject: ITS#5934 fix NULL pointer deref X-Git-Tag: ACLCHECK_0~857 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=fbf42baefa45187a6d1d78cd6486e1afe966fb02;p=openldap ITS#5934 fix NULL pointer deref --- diff --git a/libraries/libldap/request.c b/libraries/libldap/request.c index 797dc2c3d0..0fdf5c9794 100644 --- a/libraries/libldap/request.c +++ b/libraries/libldap/request.c @@ -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 }