From: Howard Chu Date: Fri, 14 Dec 2007 19:15:06 +0000 (+0000) Subject: Add missing cleanup X-Git-Tag: OPENLDAP_REL_ENG_2_4_9~20^2~316 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=be32a576371284217becc861488486af15a880ce;p=openldap Add missing cleanup --- diff --git a/servers/slapd/overlays/translucent.c b/servers/slapd/overlays/translucent.c index 5f6186d16b..9d88129f40 100644 --- a/servers/slapd/overlays/translucent.c +++ b/servers/slapd/overlays/translucent.c @@ -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;