mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 00:29:35 -05:00
protect assertion behind mutex (test should be atomic anyway...)
This commit is contained in:
parent
28a1868127
commit
d29d83a80e
1 changed files with 2 additions and 2 deletions
|
|
@ -303,10 +303,10 @@ static Connection* connection_get( ber_socket_t s )
|
|||
if( c != NULL ) {
|
||||
ber_socket_t sd;
|
||||
|
||||
assert( c->c_struct_state != SLAP_C_UNINITIALIZED );
|
||||
|
||||
ldap_pvt_thread_mutex_lock( &c->c_mutex );
|
||||
|
||||
assert( c->c_struct_state != SLAP_C_UNINITIALIZED );
|
||||
|
||||
ber_sockbuf_ctrl( c->c_sb, LBER_SB_OPT_GET_FD, &sd );
|
||||
if( c->c_struct_state != SLAP_C_USED ) {
|
||||
/* connection must have been closed due to resched */
|
||||
|
|
|
|||
Loading…
Reference in a new issue