X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fschema_prep.c;h=7c145bf148ab728f7c46855cba01436d9a9969d4;hb=ca9bb44089145bdb7435135714590d48f4a6eabd;hp=d758e1cebbba4494768df674c343b31a4b446a3f;hpb=c37a3b37b80ce3a5ba273a9db97dfb981411b685;p=openldap diff --git a/servers/slapd/schema_prep.c b/servers/slapd/schema_prep.c index d758e1cebb..7c145bf148 100644 --- a/servers/slapd/schema_prep.c +++ b/servers/slapd/schema_prep.c @@ -28,14 +28,15 @@ static int objectClassNormalize( struct slap_syntax *syntax, /* NULL if in is asserted value */ struct slap_matching_rule *mr, struct berval * in, - struct berval * out ) + struct berval * out, + void *ctx ) { ObjectClass *oc = oc_bvfind( in ); if( oc != NULL ) { - ber_dupbv( out, &oc->soc_cname ); + ber_dupbv_x( out, &oc->soc_cname, ctx ); } else { - ber_dupbv( out, in ); + ber_dupbv_x( out, in, ctx ); } #if OCDEBUG @@ -90,11 +91,7 @@ objectSubClassMatch( return SLAPD_COMPARE_UNDEFINED; } -#ifdef SLAP_NVALUES if( SLAP_MR_IS_VALUE_OF_ATTRIBUTE_SYNTAX( flags ) ) -#else - if( SLAP_IS_MR_ATTRIBUTE_SYNTAX_MATCH( flags ) ) -#endif { *matchp = ( asserted != oc ); } else { @@ -122,7 +119,8 @@ static int objectSubClassIndexer( struct slap_matching_rule *mr, struct berval *prefix, BerVarray values, - BerVarray *keysp ) + BerVarray *keysp, + void *ctx ) { int rc, noc, i; BerVarray ocvalues; @@ -132,7 +130,7 @@ static int objectSubClassIndexer( } /* over allocate */ - ocvalues = ch_malloc( sizeof( struct berval ) * (noc+16) ); + ocvalues = sl_malloc( sizeof( struct berval ) * (noc+16), ctx ); /* copy listed values (and termination) */ for( i=0; i