From: Howard Chu Date: Tue, 29 Nov 2005 11:34:47 +0000 (+0000) Subject: ITS#4226 must close cursor when limiting candidate check X-Git-Tag: OPENLDAP_REL_ENG_2_4_BP~653 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=dcaa6aa8307711c62b0fa7597faa3153dec2072c;p=openldap ITS#4226 must close cursor when limiting candidate check --- diff --git a/servers/slapd/back-bdb/filterindex.c b/servers/slapd/back-bdb/filterindex.c index a1e124d614..d12b4f6548 100644 --- a/servers/slapd/back-bdb/filterindex.c +++ b/servers/slapd/back-bdb/filterindex.c @@ -1066,8 +1066,10 @@ inequality_candidates( bdb_idl_union( ids, tmp ); if( op->ors_limit && op->ors_limit->lms_s_unchecked != -1 && - BDB_IDL_N( ids ) >= (unsigned) op->ors_limit->lms_s_unchecked ) + BDB_IDL_N( ids ) >= (unsigned) op->ors_limit->lms_s_unchecked ) { + cursor->c_close( cursor ); break; + } } ber_bvarray_free_x( keys, op->o_tmpmemctx );