mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-23 16:19:35 -05:00
ITS#9913 Protect code in clients_destroy and tier_destroy
This commit is contained in:
parent
1942bc20a8
commit
a033c1e74e
2 changed files with 5 additions and 0 deletions
|
|
@ -796,8 +796,10 @@ client_destroy( LloadConnection *c )
|
|||
void
|
||||
clients_destroy( int gentle )
|
||||
{
|
||||
epoch_t epoch = epoch_join();
|
||||
checked_lock( &clients_mutex );
|
||||
connections_walk(
|
||||
&clients_mutex, &clients, lload_connection_close, &gentle );
|
||||
checked_unlock( &clients_mutex );
|
||||
epoch_leave( epoch );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,8 +67,11 @@ tier_destroy( LloadTier *tier )
|
|||
{
|
||||
while ( !LDAP_CIRCLEQ_EMPTY( &tier->t_backends ) ) {
|
||||
LloadBackend *b = LDAP_CIRCLEQ_FIRST( &tier->t_backends );
|
||||
epoch_t epoch = epoch_join();
|
||||
|
||||
lload_backend_destroy( b );
|
||||
|
||||
epoch_leave( epoch );
|
||||
}
|
||||
|
||||
#ifdef BALANCER_MODULE
|
||||
|
|
|
|||
Loading…
Reference in a new issue