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 );
( 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 ...)
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 );