17508fb68c
Resolves: #865685
34 lines
1.0 KiB
Diff
34 lines
1.0 KiB
Diff
fix: slapd with rwm overlay segfault following ldapmodify
|
|
|
|
(newSup is NULL if it was specified, but same as old Sup)
|
|
|
|
Author: Howard Chu <hyc@openldap.org>
|
|
Upstream ITS: #7414
|
|
Upstream commit: d42c7c4
|
|
Resolves: #865685
|
|
|
|
diff --git a/servers/slapd/overlays/rwm.c b/servers/slapd/overlays/rwm.c
|
|
index cc6211e..d12fd0f 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;
|
|
}
|
|
--
|
|
1.7.11.7
|
|
|