]> git.sur5r.net Git - openldap/commitdiff
Fix ITS#6625: mutex-protect ldap_free_connection()
authorHallvard Furuseth <hallvard@openldap.org>
Mon, 6 Dec 2010 10:51:55 +0000 (10:51 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Mon, 6 Dec 2010 10:51:55 +0000 (10:51 +0000)
libraries/libldap/abandon.c

index 7cda97849a7ed0f020d416ba44b64058f61bbf38..55000407bc0ddf67f844a897386b5a1029b39ade 100644 (file)
@@ -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;
 }
-