From: Pierangelo Masarati Date: Fri, 8 Sep 2006 21:19:47 +0000 (+0000) Subject: some overlay (rwm?) might set those values X-Git-Tag: OPENLDAP_REL_ENG_2_3_MP~187 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=16043971efd13727b7e378e418b6818f9322541a;p=openldap some overlay (rwm?) might set those values --- diff --git a/servers/slapd/extended.c b/servers/slapd/extended.c index 60c50b0729..4d197d07fb 100644 --- a/servers/slapd/extended.c +++ b/servers/slapd/extended.c @@ -175,6 +175,18 @@ do_extended( op->o_bd = frontendDB; rs->sr_err = frontendDB->be_extended( op, rs ); + /* clean up in case some overlay set them? */ + if ( !BER_BVISNULL( &op->o_req_ndn ) ) { + if ( !BER_BVISNULL( &op->o_req_dn ) + && op->o_req_ndn.bv_val != op->o_req_dn.bv_val ) + { + op->o_tmpfree( op->o_req_dn.bv_val, op->o_tmpmemctx ); + } + op->o_tmpfree( op->o_req_ndn.bv_val, op->o_tmpmemctx ); + BER_BVZERO( &op->o_req_dn ); + BER_BVZERO( &op->o_req_ndn ); + } + done: return rs->sr_err; }