From be32a576371284217becc861488486af15a880ce Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 14 Dec 2007 19:15:06 +0000 Subject: [PATCH] Add missing cleanup --- servers/slapd/overlays/translucent.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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; -- 2.39.5