mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-30 03:29:35 -05:00
ITS#8354 tweak prev commit
Delay mutex init to avoid leaking the mutex
This commit is contained in:
parent
4773850d42
commit
6d2eb36ccb
1 changed files with 1 additions and 1 deletions
|
|
@ -2544,7 +2544,6 @@ syncprov_op_search( Operation *op, SlapReply *rs )
|
|||
}
|
||||
sop = ch_malloc( sizeof( syncops ));
|
||||
*sop = so;
|
||||
ldap_pvt_thread_mutex_init( &sop->s_mutex );
|
||||
sop->s_rid = srs->sr_state.rid;
|
||||
sop->s_sid = srs->sr_state.sid;
|
||||
/* set refcount=2 to prevent being freed out from under us
|
||||
|
|
@ -2574,6 +2573,7 @@ syncprov_op_search( Operation *op, SlapReply *rs )
|
|||
ldap_pvt_thread_yield();
|
||||
ldap_pvt_thread_mutex_lock( &si->si_ops_mutex );
|
||||
}
|
||||
ldap_pvt_thread_mutex_init( &sop->s_mutex );
|
||||
sop->s_next = si->si_ops;
|
||||
sop->s_si = si;
|
||||
si->si_ops = sop;
|
||||
|
|
|
|||
Loading…
Reference in a new issue