From: Ondřej Kuzník Date: Wed, 16 Dec 2015 12:47:17 +0000 (+0100) Subject: ITS#8291 Reopen cursor after delete X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3258bf40eb7c2dc9c0e8ac66c2fc47db4f4fe70f;p=openldap ITS#8291 Reopen cursor after delete --- diff --git a/servers/slapd/back-bdb/tools.c b/servers/slapd/back-bdb/tools.c index bac93bf91b..004583d198 100644 --- a/servers/slapd/back-bdb/tools.c +++ b/servers/slapd/back-bdb/tools.c @@ -1158,9 +1158,12 @@ done: } } - rc = bdb->bi_id2entry->bdi_db->cursor( - bdb->bi_id2entry->bdi_db, bdb->bi_cache.c_txn, &cursor, - bdb->bi_db_opflags ); + if ( cursor == NULL ) + { + rc = bdb->bi_id2entry->bdi_db->cursor( + bdb->bi_id2entry->bdi_db, bdb->bi_cache.c_txn, &cursor, + bdb->bi_db_opflags ); + } return rc; }