cache->c_eifree = ei;
        ldap_pvt_thread_mutex_unlock( &cache->c_eifree_mutex );
 #else
+       ldap_pvt_thread_mutex_destroy( &ei->bei_kids_mutex );
        ch_free( ei );
 #endif
 }
 
                ber_bvarray_free( bd->be_update_refs );
        }
 
+       ldap_pvt_thread_mutex_destroy( &bd->be_pcl_mutex );
+
        if ( dynamic ) {
                free( bd );
        }
                /* If we created and linked this be, remove it and free it */
                if ( !b0 ) {
                        LDAP_STAILQ_REMOVE(&backendDB, be, BackendDB, be_next);
+                       ldap_pvt_thread_mutex_destroy( &be->be_pcl_mutex );
                        ch_free( be );
                        be = NULL;
                        nbackends--;
 
                templ->query = new_cached_query;
                templ->no_of_queries++;
        } else {
+               ldap_pvt_thread_mutex_destroy(&new_cached_query->answerable_cnt_mutex);
+               ldap_pvt_thread_rdwr_destroy( &new_cached_query->rwlock );
                ch_free( new_cached_query );
                new_cached_query = find_filter( op, qbase->scopes[query->scope],
                                                        query->filter, first );
 
                                se = se_next;
                        }
                                
+                       ldap_pvt_thread_mutex_destroy(&si->si_logs->sl_mutex);
                        ch_free( si->si_logs );
                }
                if ( si->si_ctxcsn )
 
                        backend_stopdown_one( &ov->db );
                }
 
+               ldap_pvt_thread_mutex_destroy( &ov->db.be_pcl_mutex );
                ch_free(ov);
                on->on_bi.bi_private = NULL;
        }