From: Howard Chu Date: Thu, 11 Oct 2012 14:59:06 +0000 (-0700) Subject: ITS#7414 fix slapo-rwm modrdn cleanup X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d42c7c4937412aab0f603e205df7166b48b25c99;p=openldap ITS#7414 fix slapo-rwm modrdn cleanup newSup is NULL if it was specified, but same as old Sup. --- diff --git a/servers/slapd/overlays/rwm.c b/servers/slapd/overlays/rwm.c index cc6211ed25..d12fd0f82f 100644 --- a/servers/slapd/overlays/rwm.c +++ b/servers/slapd/overlays/rwm.c @@ -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; }