mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 00:29:35 -05:00
ITS#3914 bug was very close to that leak: rwm_dnattr_rewrite() already freed the original value (all this stuff may need work)
This commit is contained in:
parent
47351e3b5c
commit
64af435895
1 changed files with 4 additions and 1 deletions
|
|
@ -368,7 +368,10 @@ rwm_op_compare( Operation *op, SlapReply *rs )
|
|||
}
|
||||
|
||||
if ( mapped_vals[ 0 ].bv_val != op->orc_ava->aa_value.bv_val ) {
|
||||
ber_bvreplace_x( &op->orc_ava->aa_value, &mapped_vals[0],
|
||||
/* NOTE: if we get here, rwm_dnattr_rewrite()
|
||||
* already freed the old value, so now
|
||||
* it's invalid */
|
||||
ber_dupbv_x( &op->orc_ava->aa_value, &mapped_vals[0],
|
||||
op->o_tmpmemctx );
|
||||
ber_memfree_x( mapped_vals[ 0 ].bv_val, NULL );
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue