From e847d6fdf283f638e56ba3abe14e92a5948f4ad2 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Tue, 2 Apr 2002 11:16:00 +0000 Subject: [PATCH] fix ITS#1704 --- servers/slapd/back-meta/dncache.c | 2 +- servers/slapd/back-meta/init.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/servers/slapd/back-meta/dncache.c b/servers/slapd/back-meta/dncache.c index 324b59fe71..b658e964ce 100644 --- a/servers/slapd/back-meta/dncache.c +++ b/servers/slapd/back-meta/dncache.c @@ -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 ); diff --git a/servers/slapd/back-meta/init.c b/servers/slapd/back-meta/init.c index a67429367e..3f9a9f8964 100644 --- a/servers/slapd/back-meta/init.c +++ b/servers/slapd/back-meta/init.c @@ -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 ); -- 2.39.5