Add missing cleanup

This commit is contained in:
Howard Chu 2007-12-14 19:15:06 +00:00
parent 75b7f19ae3
commit be32a57637

View 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;