From d42c7c4937412aab0f603e205df7166b48b25c99 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 11 Oct 2012 07:59:06 -0700 Subject: [PATCH] ITS#7414 fix slapo-rwm modrdn cleanup newSup is NULL if it was specified, but same as old Sup. --- servers/slapd/overlays/rwm.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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; } -- 2.39.5