X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fvalue.c;h=e4b9ee0ed6c4ea05ae9e61947c6f629cf385febd;hb=b44cc963c2b021821ccac582054e2ffa04f4f1e1;hp=0ddd2518e52c9e7d928e702c2df87cc18f6df166;hpb=3bacb800d4462703184b2a1b62d60339ca1cb9ef;p=openldap diff --git a/servers/slapd/value.c b/servers/slapd/value.c index 0ddd2518e5..e4b9ee0ed6 100644 --- a/servers/slapd/value.c +++ b/servers/slapd/value.c @@ -125,12 +125,12 @@ value_match( int *match, AttributeDescription *ad, MatchingRule *mr, + unsigned flags, struct berval *v1, /* stored value */ void *v2, /* assertion */ const char ** text ) { int rc; - int usage = 0; struct berval *nv1 = NULL; if( !mr->smr_match ) { @@ -146,7 +146,7 @@ value_match( } } - rc = (mr->smr_match)( match, usage, + rc = (mr->smr_match)( match, flags, ad->ad_type->sat_syntax, mr, nv1 != NULL ? nv1 : v1, @@ -184,13 +184,15 @@ int value_find( int match; const char *text; - rc = value_match( &match, ad, mr, vals[i], - nval == NULL ? val : nval, &text ); + rc = value_match( &match, ad, mr, 0, + vals[i], nval == NULL ? val : nval, &text ); if( rc == LDAP_SUCCESS && match == 0 ) { + ber_bvfree( nval ); return LDAP_SUCCESS; } } + ber_bvfree( nval ); return LDAP_NO_SUCH_ATTRIBUTE; }