next = lm->lm_next;
ldap_msgfree( lm );
}
+
+ if ( ld->ld_abandoned != NULL ) {
+ LDAP_FREE( ld->ld_abandoned );
+ ld->ld_abandoned = NULL;
+ }
#ifdef LDAP_R_COMPILE
ldap_pvt_thread_mutex_unlock( &ld->ld_res_mutex );
#endif
ld->ld_referrals = NULL;
}
- if ( ld->ld_abandoned != NULL ) {
- LDAP_FREE( ld->ld_abandoned );
- ld->ld_abandoned = NULL;
- }
-
if ( ld->ld_selectinfo != NULL ) {
ldap_free_select_info( ld->ld_selectinfo );
ld->ld_selectinfo = NULL;
#ifdef LDAP_R_COMPILE
ldap_pvt_thread_mutex_destroy( &ld->ld_req_mutex );
ldap_pvt_thread_mutex_destroy( &ld->ld_res_mutex );
+ ldap_pvt_thread_mutex_destroy( &ld->ld_conn_mutex );
#endif
#ifndef NDEBUG
LDAP_TRASH(ld);