From: Pierangelo Masarati Date: Fri, 18 Aug 2006 17:14:38 +0000 (+0000) Subject: re-fix ITS#4405 (really start from the first conn) X-Git-Tag: OPENLDAP_REL_ENG_2_3_27~1 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5570c977e8d34d5c89862b9b25bc98a457dd5124;p=openldap re-fix ITS#4405 (really start from the first conn) --- diff --git a/CHANGES b/CHANGES index 11a402ed04..25afc751c0 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,7 @@ OpenLDAP 2.3 Change Log OpenLDAP 2.3.27 Engineering + Fixed libldap dangling pointer issue (previous fix was broken) (ITS#4405) OpenLDAP 2.3.26 Release Fixed libldap dnssrv bug with "not present" positive statement (ITS#4610) diff --git a/libraries/libldap/result.c b/libraries/libldap/result.c index 7e0bad24ba..2c0ede80c4 100644 --- a/libraries/libldap/result.c +++ b/libraries/libldap/result.c @@ -333,8 +333,7 @@ wait4msg( ldap_pvt_thread_mutex_lock( &ld->ld_conn_mutex ); #endif for ( lc = ld->ld_conns; - rc == LDAP_MSG_X_KEEP_LOOKING && lc != NULL; - lc = lc->lconn_next ) + rc == LDAP_MSG_X_KEEP_LOOKING && lc != NULL; ) { if ( lc->lconn_status == LDAP_CONNST_CONNECTED && ldap_is_read_ready( ld, lc->lconn_sb )) @@ -353,8 +352,14 @@ wait4msg( * sane; better restart * (ITS#4405) */ lc = ld->ld_conns; + + /* don't get to next conn! */ + break; } } + + /* next conn */ + lc = lc->lconn_next; } #ifdef LDAP_R_COMPILE ldap_pvt_thread_mutex_unlock( &ld->ld_conn_mutex );