X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fextended.c;h=4d197d07fbdcb2fc0783a1726f0bc925c595ae52;hb=dbaf7c5c2503b2770c9075e30a9a63b6ff577d6f;hp=60c50b07290d0d5d2816909ab5e35fca593ebc1d;hpb=d9720d50dda765a54d6b3be8bfe122fb259f329d;p=openldap 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; }