mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-17 12:24:19 -05:00
address ITS#3914
This commit is contained in:
parent
4ed743cc84
commit
61f11773ba
2 changed files with 9 additions and 11 deletions
|
|
@ -120,7 +120,7 @@ do_compare(
|
|||
cleanup:;
|
||||
op->o_tmpfree( op->o_req_dn.bv_val, op->o_tmpmemctx );
|
||||
op->o_tmpfree( op->o_req_ndn.bv_val, op->o_tmpmemctx );
|
||||
if ( ava.aa_value.bv_val ) {
|
||||
if ( !BER_BVISNULL( &ava.aa_value ) ) {
|
||||
op->o_tmpfree( ava.aa_value.bv_val, op->o_tmpmemctx );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -111,11 +111,8 @@ rwm_op_add( Operation *op, SlapReply *rs )
|
|||
}
|
||||
|
||||
if ( olddn != op->o_req_dn.bv_val ) {
|
||||
ch_free( op->ora_e->e_name.bv_val );
|
||||
ch_free( op->ora_e->e_nname.bv_val );
|
||||
|
||||
ber_dupbv( &op->ora_e->e_name, &op->o_req_dn );
|
||||
ber_dupbv( &op->ora_e->e_nname, &op->o_req_ndn );
|
||||
ber_bvreplace( &op->ora_e->e_name, &op->o_req_dn );
|
||||
ber_bvreplace( &op->ora_e->e_nname, &op->o_req_ndn );
|
||||
}
|
||||
|
||||
/* Count number of attributes in entry */
|
||||
|
|
@ -325,8 +322,7 @@ rwm_op_compare( Operation *op, SlapReply *rs )
|
|||
return -1;
|
||||
|
||||
} else if ( mapped_vals[0].bv_val != op->orc_ava->aa_value.bv_val ) {
|
||||
free( op->orc_ava->aa_value.bv_val );
|
||||
op->orc_ava->aa_value = mapped_vals[0];
|
||||
ber_bvreplace_x( &op->orc_ava->aa_value, &mapped_vals[0], op->o_tmpmemctx );
|
||||
}
|
||||
mapped_at = op->orc_ava->aa_desc->ad_cname;
|
||||
|
||||
|
|
@ -371,7 +367,10 @@ rwm_op_compare( Operation *op, SlapReply *rs )
|
|||
return -1;
|
||||
}
|
||||
|
||||
op->orc_ava->aa_value = mapped_vals[0];
|
||||
if ( mapped_vals[ 0 ].bv_val != op->orc_ava->aa_value.bv_val ) {
|
||||
ber_bvreplace_x( &op->orc_ava->aa_value, &mapped_vals[0],
|
||||
op->o_tmpmemctx );
|
||||
}
|
||||
}
|
||||
op->orc_ava->aa_desc = ad;
|
||||
}
|
||||
|
|
@ -932,8 +931,7 @@ rwm_attrs( Operation *op, SlapReply *rs, Attribute** a_first, int stripEntryDN )
|
|||
* the value is replaced by
|
||||
* ch_alloc'ed memory
|
||||
*/
|
||||
ch_free( bv[0].bv_val );
|
||||
ber_dupbv( &bv[0], &mapped );
|
||||
ber_bvreplace( &bv[0], &mapped );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue