]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
Tweak ITS#8722 fix: Use XCURSOR_REFRESH()
authorHallvard Furuseth <hallvard@openldap.org>
Sun, 10 Sep 2017 22:00:14 +0000 (00:00 +0200)
committerHoward Chu <hyc@openldap.org>
Sat, 10 Oct 2020 12:09:49 +0000 (13:09 +0100)
This checks XCURSOR_INITED() and fixes the mn_flags check.

libraries/liblmdb/mdb.c

index 7f67bbb887555057ebf9e9a78aa1da94b112c399..79e96e2bbd7bc18d7b76a1a5e65853762772abfb 100644 (file)
@@ -8454,13 +8454,7 @@ mdb_cursor_del(MDB_cursor *mc, unsigned int flags)
                                                if (m2 == mc || m2->mc_snum < mc->mc_snum) continue;
                                                if (!(m2->mc_flags & C_INITIALIZED)) continue;
                                                if (m2->mc_pg[mc->mc_top] == mp) {
-                                                       MDB_node *n2 = leaf;
-                                                       if (m2->mc_ki[mc->mc_top] >= NUMKEYS(mp)) continue;
-                                                       if (m2->mc_ki[mc->mc_top] != mc->mc_ki[mc->mc_top]) {
-                                                               n2 = NODEPTR(mp, m2->mc_ki[mc->mc_top]);
-                                                               if (n2->mn_flags & F_SUBDATA) continue;
-                                                       }
-                                                       m2->mc_xcursor->mx_cursor.mc_pg[0] = NODEDATA(n2);
+                                                       XCURSOR_REFRESH(m2, mc->mc_top, mp);
                                                }
                                        }
                                }