]> git.sur5r.net Git - openldap/commitdiff
ITS#4226 must close cursor when limiting candidate check
authorHoward Chu <hyc@openldap.org>
Tue, 29 Nov 2005 11:34:47 +0000 (11:34 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 29 Nov 2005 11:34:47 +0000 (11:34 +0000)
servers/slapd/back-bdb/filterindex.c

index a1e124d614cea1e5e08935b1815907d4efdce687..d12b4f654842af02e7b8f98062a9c52f16e1545b 100644 (file)
@@ -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 );