]> git.sur5r.net Git - openldap/commitdiff
Fix crash in mra_free, freeing ber-private value.
authorHoward Chu <hyc@openldap.org>
Fri, 30 Aug 2002 12:38:50 +0000 (12:38 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 30 Aug 2002 12:38:50 +0000 (12:38 +0000)
servers/slapd/mra.c

index d4e331f194ad36fce2c3bc049dad5a1ce1e54b59..fbd3a6afa9bc4d57712946bb844b968238c04c23 100644 (file)
@@ -276,8 +276,10 @@ get_mra(
                /*
                 * Need to normalize, but how?
                 */
-               ma->ma_value = value;
-               rc = value_validate( ma->ma_rule, &ma->ma_value, text );
+               rc = value_validate( ma->ma_rule, &value, text );
+               if ( rc == LDAP_SUCCESS ) {
+                       ber_dupbv( &ma->ma_value, &value );
+               }
 
        }
 #endif /* SLAP_X_MRA_MATCH_DNATTRS */