ITS#7414 fix slapo-rwm modrdn cleanup

newSup is NULL if it was specified, but same as old Sup.
This commit is contained in:
Howard Chu 2012-10-11 07:59:06 -07:00
parent c1800082cc
commit d42c7c4937

View File

@ -107,10 +107,12 @@ rwm_op_rollback( Operation *op, SlapReply *rs, rwm_op_state *ros )
break;
case LDAP_REQ_MODRDN:
if ( op->orr_newSup != ros->orr_newSup ) {
ch_free( op->orr_newSup->bv_val );
ch_free( op->orr_nnewSup->bv_val );
op->o_tmpfree( op->orr_newSup, op->o_tmpmemctx );
op->o_tmpfree( op->orr_nnewSup, op->o_tmpmemctx );
if ( op->orr_newSup ) {
ch_free( op->orr_newSup->bv_val );
ch_free( op->orr_nnewSup->bv_val );
op->o_tmpfree( op->orr_newSup, op->o_tmpmemctx );
op->o_tmpfree( op->orr_nnewSup, op->o_tmpmemctx );
}
op->orr_newSup = ros->orr_newSup;
op->orr_nnewSup = ros->orr_nnewSup;
}