}
/* return entries */
- for ( monitor_cache_lock( e ); e != NULL; ) {
+ for ( ; e != NULL; e = e_tmp ) {
Entry *sub_nv = NULL, *sub_ch = NULL;
+
+ monitor_cache_lock( e );
monitor_entry_update( op, rs, e );
if ( e == e_nonvolatile )
rs->sr_flags = REP_ENTRY_MUSTRELEASE;
rc = send_search_entry( op, rs );
if ( rc ) {
+ for ( e = sub_ch; e != NULL; e = sub_nv ) {
+ mp = ( monitor_entry_t * )e->e_private;
+ sub_nv = mp->mp_next;
+ monitor_cache_lock( e );
+ monitor_cache_release( mi, e );
+ }
goto freeout;
}
} else {
rc = monitor_send_children( op, rs, sub_nv, sub_ch, sub );
if ( rc ) {
freeout:
- /* FIXME: may leak generated children */
if ( nonvolatile == 0 ) {
for ( ; e_tmp != NULL; ) {
mp = ( monitor_entry_t * )e_tmp->e_private;
return( rc );
}
}
-
- e = e_tmp;
- if ( e )
- monitor_cache_lock( e );
}
return LDAP_SUCCESS;