From fbf42baefa45187a6d1d78cd6486e1afe966fb02 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Mon, 9 Feb 2009 21:14:46 +0000 Subject: [PATCH] ITS#5934 fix NULL pointer deref --- libraries/libldap/request.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 } -- 2.39.5