]> git.sur5r.net Git - openldap/commitdiff
some overlay (rwm?) might set those values
authorPierangelo Masarati <ando@openldap.org>
Fri, 8 Sep 2006 21:19:47 +0000 (21:19 +0000)
committerPierangelo Masarati <ando@openldap.org>
Fri, 8 Sep 2006 21:19:47 +0000 (21:19 +0000)
servers/slapd/extended.c

index 60c50b07290d0d5d2816909ab5e35fca593ebc1d..4d197d07fbdcb2fc0783a1726f0bc925c595ae52 100644 (file)
@@ -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;
 }