LDAPMessage *res = NULL, *e;
int rc = 0, sres = LDAP_SUCCESS;
char *matched = NULL;
- int i, last = 0, ncandidates = 0,
+ int last = 0, ncandidates = 0,
initial_candidates = 0, candidate_match = 0;
+ long i;
dncookie dc;
int is_ok = 0;
void *savepriv;
* FIXME: only the last one gets caught!
*/
savepriv = op->o_private;
- op->o_private = (void *)mi->mi_ntargets;
+ op->o_private = (void *)(long)mi->mi_ntargets;
if ( candidate_match > 0 ) {
struct berval pmatched = BER_BVNULL;
}
}
- if ( last == 0 ) {
- ch_free( attr->a_vals );
- ch_free( attr );
+ if ( last == 0 && attr->a_vals != &slap_dummy_bv ) {
+ attr_free( attr );
goto next_attr;
}
}