From 5ecd624f50e1cd671dbb5acd22c6694d092ec1e4 Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Mon, 6 Dec 2010 10:51:55 +0000 Subject: [PATCH] Fix ITS#6625: mutex-protect ldap_free_connection() --- libraries/libldap/abandon.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } - -- 2.39.5