From bf860f0596a347d51460820145711f14044d1296 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Sat, 1 Apr 2006 00:30:07 +0000 Subject: [PATCH] ld_abandoned must be protected by ld_res_mutex --- libraries/libldap/unbind.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libraries/libldap/unbind.c b/libraries/libldap/unbind.c index 37616ed706..564432ea78 100644 --- a/libraries/libldap/unbind.c +++ b/libraries/libldap/unbind.c @@ -106,6 +106,11 @@ ldap_ld_free( 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 @@ -125,11 +130,6 @@ ldap_ld_free( 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; -- 2.39.5