]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/overlays/dynlist.c
ITS#3682, dup entry and free the DB's copy before sending it
[openldap] / servers / slapd / overlays / dynlist.c
index 1daf77fd05ec3f56d8c0f672376fca4e155996b2..c417292000929294e4b646338a5a265ea5e761b3 100644 (file)
@@ -211,7 +211,7 @@ dynlist_sc_update( Operation *op, SlapReply *rs )
 
                /* test access to attribute */
                for ( i = 0; !BER_BVISNULL( &a->a_vals[i] ); i++ )
-                       /* jst count */ ;
+                       /* just count */ ;
 
                vals = op->o_tmpalloc( ( i + 1 ) * sizeof( struct berval ), op->o_tmpmemctx );
                if ( a->a_nvals != a->a_vals ) {
@@ -275,7 +275,7 @@ dynlist_send_entry( Operation *op, SlapReply *rs )
        Attribute       *a;
        slap_callback   cb;
        Operation       o = *op;
-       SlapReply       r = *rs;
+       SlapReply       r = { REP_SEARCH };
        struct berval   *url;
        Entry           *e;
        int             e_flags;
@@ -300,6 +300,7 @@ dynlist_send_entry( Operation *op, SlapReply *rs )
        cb.sc_next = NULL;
 
        o.o_callback = &cb;
+       o.ors_deref = LDAP_DEREF_NEVER;
        o.ors_limit = NULL;
        o.ors_tlimit = SLAP_NO_LIMIT;
        o.ors_slimit = SLAP_NO_LIMIT;
@@ -516,6 +517,7 @@ dynlist_compare( Operation *op, SlapReply *rs )
        }
 
        o.ors_scope = LDAP_SCOPE_BASE;
+       o.ors_deref = LDAP_DEREF_NEVER;
        an[0].an_name = op->orc_ava->aa_desc->ad_cname;
        an[0].an_desc = op->orc_ava->aa_desc;
        BER_BVZERO( &an[1].an_name );