From: Howard Chu Date: Wed, 19 May 2004 07:31:22 +0000 (+0000) Subject: Fix prev commit, test015 works again X-Git-Tag: OPENDLAP_REL_ENG_2_2_MP~359 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=681431e73a06929c867a23a44a843886e14fba5f;p=openldap Fix prev commit, test015 works again --- diff --git a/servers/slapd/filterentry.c b/servers/slapd/filterentry.c index 8ac43338fe..8527c038d9 100644 --- a/servers/slapd/filterentry.c +++ b/servers/slapd/filterentry.c @@ -330,8 +330,6 @@ static int test_mra_filter( return LDAP_INVALID_SYNTAX; } - rc = LDAP_COMPARE_FALSE; - /* for each AVA of each RDN ... */ for ( iRDN = 0; dn[ iRDN ]; iRDN++ ) { LDAPRDN rdn = dn[ iRDN ]; @@ -385,18 +383,17 @@ static int test_mra_filter( op->o_tmpfree( value.bv_val, memctx ); } - if( rc != LDAP_SUCCESS ) { - break; + if ( rc == LDAP_SUCCESS && ret == 0 ) { + rc = LDAP_COMPARE_TRUE; } - if ( ret == 0 ) { - rc = LDAP_COMPARE_TRUE; - break; + if( rc != LDAP_SUCCESS ) { + ldap_dnfree_x( dn, memctx ); + return rc; } } } ldap_dnfree_x( dn, memctx ); - return rc; } return LDAP_COMPARE_FALSE;