From: Hallvard Furuseth Date: Mon, 6 Dec 2010 10:51:55 +0000 (+0000) Subject: Fix ITS#6625: mutex-protect ldap_free_connection() X-Git-Tag: MIGRATION_CVS2GIT~375 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5ecd624f50e1cd671dbb5acd22c6694d092ec1e4;p=openldap Fix ITS#6625: mutex-protect ldap_free_connection() --- diff --git a/libraries/libldap/abandon.c b/libraries/libldap/abandon.c index 7cda97849a..55000407bc 100644 --- a/libraries/libldap/abandon.c +++ b/libraries/libldap/abandon.c @@ -279,7 +279,9 @@ start_again:; if ( lr != NULL ) { if ( sendabandon || lr->lr_status == LDAP_REQST_WRITING ) { + LDAP_MUTEX_LOCK( &ld->ld_conn_mutex ); ldap_free_connection( ld, lr->lr_conn, 0, 1 ); + LDAP_MUTEX_UNLOCK( &ld->ld_conn_mutex ); } if ( origid == msgid ) { @@ -445,4 +447,3 @@ ldap_int_bisect_delete( ber_int_t **vp, ber_len_t *np, int id, int idx ) return 0; } -