assert( SLAP_MR_IS_VALUE_OF_SYNTAX( usage ));
- ber_dupbv( &out, val );
- if( BER_BVISEMPTY( &out ) ) {
+ ber_dupbv_x( &out, val, ctx );
+ if ( BER_BVISEMPTY( &out ) ) {
*normalized = out;
} else {
rc = dnNormalize( 0, NULL, NULL, &out, normalized, ctx );
if( rc != LDAP_SUCCESS ) {
- free( out.bv_val );
+ slap_sl_free( out.bv_val, ctx );
return LDAP_INVALID_SYNTAX;
}
normalized->bv_val[normalized->bv_len] = '\0';
}
- free( out.bv_val );
+ slap_sl_free( out.bv_val, ctx );
}
return LDAP_SUCCESS;