From fe6f3683fa3b4c2e20bbd362a3c7d16adb517f52 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sat, 6 Sep 2008 02:11:26 +0000 Subject: [PATCH] ITS#5687 more cleanup fixes --- servers/slapd/overlays/rwm.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/servers/slapd/overlays/rwm.c b/servers/slapd/overlays/rwm.c index 3e515481ee..6213cff9ae 100644 --- a/servers/slapd/overlays/rwm.c +++ b/servers/slapd/overlays/rwm.c @@ -59,13 +59,16 @@ rwm_op_cleanup( Operation *op, SlapReply *rs ) op->o_req_ndn = ros->ro_ndn; if ( !BER_BVISNULL( &ros->r_dn ) - && ros->r_dn.bv_val != ros->r_ndn.bv_val ) + && ros->r_dn.bv_val != ros->r_ndn.bv_val + && ros->r_dn.bv_val != ros->ro_dn.bv_val ) { ch_free( ros->r_dn.bv_val ); BER_BVZERO( &ros->r_dn ); } - if ( !BER_BVISNULL( &ros->r_ndn ) ) { + if ( !BER_BVISNULL( &ros->r_ndn ) + && ros->r_ndn.bv_val != ros->ro_ndn.bv_val ) + { ch_free( ros->r_ndn.bv_val ); BER_BVZERO( &ros->r_ndn ); } -- 2.39.5