]> git.sur5r.net Git - openldap/commitdiff
fix ITS#1704
authorPierangelo Masarati <ando@openldap.org>
Tue, 2 Apr 2002 11:16:00 +0000 (11:16 +0000)
committerPierangelo Masarati <ando@openldap.org>
Tue, 2 Apr 2002 11:16:00 +0000 (11:16 +0000)
servers/slapd/back-meta/dncache.c
servers/slapd/back-meta/init.c

index 324b59fe71b8323fbd77ab08b84c310393e28f1f..b658e964ce78d996734df23d7c7f749c2a16e688 100644 (file)
@@ -270,7 +270,7 @@ meta_dncache_delete_entry(
        ldap_pvt_thread_mutex_lock( &cache->mutex );
        entry = avl_delete( &cache->tree, ( caddr_t )&tmp_entry,
                        meta_dncache_cmp );
-       ldap_pvt_thread_mutex_lock( &cache->mutex );
+       ldap_pvt_thread_mutex_unlock( &cache->mutex );
 
        if ( entry != NULL ) {
                meta_dncache_free( ( void * )entry );
index a67429367e83af02504722b33cd30ce6dc212e4f..3f9a9f89642862b6c13716615732db3a3d8cdfab 100644 (file)
@@ -230,9 +230,6 @@ meta_back_db_destroy(
                                        ( AVL_FREE )conn_free );
                }
 
-               ldap_pvt_thread_mutex_unlock( &li->cache.mutex );
-               ldap_pvt_thread_mutex_destroy( &li->cache.mutex );
-
                /*
                 * Destroy the per-target stuff (assuming there's at
                 * least one ...)
@@ -253,7 +250,8 @@ meta_back_db_destroy(
                ldap_pvt_thread_mutex_unlock( &li->cache.mutex );
                ldap_pvt_thread_mutex_destroy( &li->cache.mutex );
 
-                                               
+               ldap_pvt_thread_mutex_unlock( &li->conn_mutex );
+               ldap_pvt_thread_mutex_destroy( &li->conn_mutex );
        }
 
        free( be->be_private );