]> git.sur5r.net Git - openldap/commitdiff
Fix prev commit, test015 works again
authorHoward Chu <hyc@openldap.org>
Wed, 19 May 2004 07:31:22 +0000 (07:31 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 19 May 2004 07:31:22 +0000 (07:31 +0000)
servers/slapd/filterentry.c

index 8ac43338fef7a233f616c7333062a220f17cb8a8..8527c038d97489fc1bab2afcfb74b185e1f48cf7 100644 (file)
@@ -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;