mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
ITS#8039 more cleanup
This commit is contained in:
parent
9232232397
commit
cb3952db4b
@ -771,6 +771,7 @@ again:
|
|||||||
static void free_resinfo( syncres *sr )
|
static void free_resinfo( syncres *sr )
|
||||||
{
|
{
|
||||||
syncres **st;
|
syncres **st;
|
||||||
|
int freeit = 0;
|
||||||
ldap_pvt_thread_mutex_lock( &sr->s_info->ri_mutex );
|
ldap_pvt_thread_mutex_lock( &sr->s_info->ri_mutex );
|
||||||
for (st = &sr->s_info->ri_list; *st; st = &(*st)->s_rilist) {
|
for (st = &sr->s_info->ri_list; *st; st = &(*st)->s_rilist) {
|
||||||
if (*st == sr) {
|
if (*st == sr) {
|
||||||
@ -778,8 +779,10 @@ static void free_resinfo( syncres *sr )
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ( !sr->s_info->ri_list )
|
||||||
|
freeit = 1;
|
||||||
ldap_pvt_thread_mutex_unlock( &sr->s_info->ri_mutex );
|
ldap_pvt_thread_mutex_unlock( &sr->s_info->ri_mutex );
|
||||||
if ( !sr->s_info->ri_list ) {
|
if ( freeit ) {
|
||||||
ldap_pvt_thread_mutex_destroy( &sr->s_info->ri_mutex );
|
ldap_pvt_thread_mutex_destroy( &sr->s_info->ri_mutex );
|
||||||
if ( sr->s_info->ri_e )
|
if ( sr->s_info->ri_e )
|
||||||
entry_free( sr->s_info->ri_e );
|
entry_free( sr->s_info->ri_e );
|
||||||
|
Loading…
Reference in New Issue
Block a user