/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 1999-2010 The OpenLDAP Foundation.
+ * Copyright 1999-2012 The OpenLDAP Foundation.
* Portions Copyright 1999-2003 Howard Chu.
* Portions Copyright 2000-2003 Pierangelo Masarati.
* All rights reserved.
}
assert( i > 0 || x > 0 );
- *anp = op->o_tmpalloc( ( i + x + 1 )* sizeof( AttributeName ),
+ *anp = op->o_tmpcalloc( ( i + x + 1 ), sizeof( AttributeName ),
op->o_tmpmemctx );
if ( *anp == NULL ) {
return LDAP_NO_MEMORY;
return -1;
}
- } else if ( ad->ad_type->sat_equality->smr_usage & SLAP_MR_MUTATION_NORMALIZER ) {
+ } else if ( ad->ad_type->sat_equality &&
+ ( ad->ad_type->sat_equality->smr_usage & SLAP_MR_MUTATION_NORMALIZER ) )
+ {
if ( ad->ad_type->sat_equality->smr_normalize(
(SLAP_MR_DENORMALIZE|SLAP_MR_VALUE_OF_ASSERTION_SYNTAX),
NULL, NULL, value, &vtmp, memctx ) )
return LDAP_OTHER;
}
+#if 0
+ /* ITS#6814: give the caller a chance to use undefined filters */
if ( f->f_choice & SLAPD_FILTER_UNDEFINED ) {
goto computed;
}
+#endif
switch ( f->f_choice & SLAPD_FILTER_MASK ) {
case LDAP_FILTER_EQUALITY:
}
ber_str2bv( newurl, 0, 1, &a_vals[i] );
- LDAP_FREE( newurl );
+ ber_memfree( newurl );
if ( pa_nvals ) {
ludp->lud_dn = ndn.bv_val;
ch_free( (*pa_nvals)[i].bv_val );
}
ber_str2bv( newurl, 0, 1, &(*pa_nvals)[i] );
- LDAP_FREE( newurl );
+ ber_memfree( newurl );
}
ch_free( oldval.bv_val );
ch_free( a_vals[i].bv_val );
ber_str2bv( newurl, 0, 1, &a_vals[i] );
- LDAP_FREE( newurl );
+ ber_memfree( newurl );
ludp->lud_dn = olddn.bv_val;
}
break;