]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-bdb/filterindex.c
return structuralObjectClass errors
[openldap] / servers / slapd / back-bdb / filterindex.c
index a1e124d614cea1e5e08935b1815907d4efdce687..13bca595f77b093d424462a0da1652f2f1008ef4 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2000-2005 The OpenLDAP Foundation.
+ * Copyright 2000-2006 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -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 );