mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-29 19:19:35 -05:00
Plug mutex/rwlock leaks (destroy them)
This commit is contained in:
parent
78a0be6a42
commit
720aa4b77e
5 changed files with 8 additions and 0 deletions
|
|
@ -101,6 +101,7 @@ bdb_cache_entryinfo_free( Cache *cache, EntryInfo *ei )
|
|||
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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -474,6 +474,8 @@ void backend_destroy_one( BackendDB *bd, int dynamic )
|
|||
ber_bvarray_free( bd->be_update_refs );
|
||||
}
|
||||
|
||||
ldap_pvt_thread_mutex_destroy( &bd->be_pcl_mutex );
|
||||
|
||||
if ( dynamic ) {
|
||||
free( bd );
|
||||
}
|
||||
|
|
@ -623,6 +625,7 @@ backend_db_init(
|
|||
/* 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--;
|
||||
|
|
|
|||
|
|
@ -1599,6 +1599,8 @@ add_query(
|
|||
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 );
|
||||
|
|
|
|||
|
|
@ -3170,6 +3170,7 @@ syncprov_db_destroy(
|
|||
se = se_next;
|
||||
}
|
||||
|
||||
ldap_pvt_thread_mutex_destroy(&si->si_logs->sl_mutex);
|
||||
ch_free( si->si_logs );
|
||||
}
|
||||
if ( si->si_ctxcsn )
|
||||
|
|
|
|||
|
|
@ -1383,6 +1383,7 @@ translucent_db_destroy( BackendDB *be, ConfigReply *cr )
|
|||
backend_stopdown_one( &ov->db );
|
||||
}
|
||||
|
||||
ldap_pvt_thread_mutex_destroy( &ov->db.be_pcl_mutex );
|
||||
ch_free(ov);
|
||||
on->on_bi.bi_private = NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue