]> git.sur5r.net Git - openldap/commitdiff
Make sure we release entry lock before sending paged response
authorLuke Howard <lukeh@openldap.org>
Mon, 15 Aug 2005 11:27:42 +0000 (11:27 +0000)
committerLuke Howard <lukeh@openldap.org>
Mon, 15 Aug 2005 11:27:42 +0000 (11:27 +0000)
servers/slapd/back-bdb/search.c

index a7525be1d813774c8ad10c7c6ad86b5d199f3a04..12d7ea3eb6f9e503791565bb3f64dde34ca70120 100644 (file)
@@ -850,6 +850,12 @@ fetch_entry_retry:
 
                        if ( get_pagedresults(op) > SLAP_CONTROL_IGNORED ) {
                                if ( rs->sr_nentries >= ((PagedResultsState *)op->o_pagedresults_state)->ps_size ) {
+#ifdef SLAP_ZONE_ALLOC
+                                       slap_zn_runlock(bdb->bi_cache.c_zctx, e);
+#endif
+                                       bdb_cache_return_entry_r( bdb->bi_dbenv,
+                                                       &bdb->bi_cache, e, &lock );
+                                       e = NULL;
                                        send_paged_response( op, rs, &lastid, tentries );
                                        goto done;
                                }