]> git.sur5r.net Git - openldap/commitdiff
Add missing cleanup
authorHoward Chu <hyc@openldap.org>
Fri, 14 Dec 2007 19:15:06 +0000 (19:15 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 14 Dec 2007 19:15:06 +0000 (19:15 +0000)
servers/slapd/overlays/translucent.c

index 5f6186d16b1573a27c513882ea1178e75de3b1f9..9d88129f40660f56e6bb0bee61be841e832d9458 100644 (file)
@@ -956,6 +956,20 @@ static int translucent_search(Operation *op, SlapReply *rs) {
        op->o_callback = cb.sc_next;
        /* Send out anything remaining on the list and finish */
        if ( tc.step & USE_LIST ) {
+               if ( tc.list ) {
+                       Avlnode *av;
+
+                       av = tavl_end( tc.list, TAVL_DIR_LEFT );
+                       while ( av ) {
+                               rs->sr_flags = REP_ENTRY_MUSTBEFREED;
+                               rs->sr_entry = av->avl_data;
+                               rc = send_search_entry( op, rs );
+                               if ( rc ) break;
+                               av = tavl_next( av, TAVL_DIR_RIGHT );
+                       }
+                       tavl_free( tc.list, NULL );
+               }
+               send_ldap_result( op, rs );
        }
 
        return rc;