ber_len_t length;
struct berval type = { 0, NULL };
struct berval value = { 0, NULL };
+ struct berval tmp = { 0, NULL };
MatchingRuleAssertion ma;
memset( &ma, 0, sizeof ma);
}
if ( tag == LDAP_FILTER_EXT_OID ) {
- rtag = ber_scanf( ber, "m", &ma.ma_rule_text );
+ rtag = ber_scanf( ber, "m", &tmp );
if ( rtag == LBER_ERROR ) {
#ifdef NEW_LOGGING
LDAP_LOG( OPERATION, ERR,
*text = "Error parsing matching rule in matching rule assertion";
return SLAPD_DISCONNECT;
}
+ ber_dupbv( &ma.ma_rule_text, &tmp );
rtag = ber_scanf( ber, "t", &tag );
if( rtag == LBER_ERROR ) {
ma.ma_rule,
SLAP_MR_EXT|SLAP_MR_VALUE_OF_ASSERTION_SYNTAX,
&value, &ma.ma_value, text );
- if ( rc == LDAP_SUCCESS ) {
- ma.ma_value = value;
- } else
-#else
- if( rc != LDAP_SUCCESS )
#endif
- {
+
+ if( rc != LDAP_SUCCESS ) {
return rc;
}