slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
dynlist_info_t *dli = (dynlist_info_t *)on->on_bi.bi_private;
Operation o = *op;
- Entry *e;
+ Entry *e = NULL;
for ( ; dli != NULL; dli = dli->dli_next ) {
if ( op->oq_compare.rs_ava->aa_desc == dli->dli_member_ad ) {
o.o_bd = select_backend( &o.o_req_ndn, 1 );
if ( !o.o_bd || !o.o_bd->be_search ) {
- return SLAP_CB_CONTINUE;
+ goto release;
}
BER_BVSTR( &o.ors_filterstr, "(objectClass=*)" );
o.ors_filter = str2filter_x( op, o.ors_filterstr.bv_val );
if ( o.ors_filter == NULL ) {
/* FIXME: error? */
- return SLAP_CB_CONTINUE;
+ goto release;
}
o.ors_scope = LDAP_SCOPE_BASE;
}
if ( rc != 0 ) {
- return rc;
+ goto release;
}
if ( dlc.dlc_e != NULL ) {
if ( r.sr_err != LDAP_SUCCESS || r.sr_entry == NULL ) {
/* error? */
- return SLAP_CB_CONTINUE;
+ goto release;
}
for ( a = attrs_find( r.sr_entry->e_attrs, op->orc_ava->aa_desc );
}
}
+release:;
+ if ( e != NULL ) {
+ overlay_entry_release_ov( &o, e, 0, on );
+ }
+
return SLAP_CB_CONTINUE;
}
rc = slap_str2ad( "dgIdentity", &ad_dgIdentity, &text );
if ( rc != LDAP_SUCCESS ) {
- sprintf( cr->msg, "unable to fetch attributeDescription \"dgIdentity\": %d (%s)",
+ snprintf( cr->msg, sizeof( cr->msg),
+ "unable to fetch attributeDescription \"dgIdentity\": %d (%s)",
rc, text );
Debug( LDAP_DEBUG_ANY, "dynlist_db_open: %s\n", cr->msg, 0, 0 );
/* Just a warning */