]> git.sur5r.net Git - openldap/commitdiff
ITS#8321 fix mdb_cursor_chk()
authorHoward Chu <hyc@openldap.org>
Mon, 23 Nov 2015 01:10:05 +0000 (01:10 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 23 Nov 2015 01:40:56 +0000 (01:40 +0000)
It was reporting spurious errors due to uninit'd cursors

libraries/liblmdb/mdb.c

index 451d8d33093dad23fa51e42d8fff9afbb66a3136..c4f3c450a05e67c27f66292feb63cb25137935bf 100644 (file)
@@ -1673,7 +1673,7 @@ mdb_cursor_chk(MDB_cursor *mc)
        MDB_node *node;
        MDB_page *mp;
 
-       if (!mc->mc_snum && !(mc->mc_flags & C_INITIALIZED)) return;
+       if (!mc->mc_snum || !(mc->mc_flags & C_INITIALIZED)) return;
        for (i=0; i<mc->mc_top; i++) {
                mp = mc->mc_pg[i];
                node = NODEPTR(mp, mc->mc_ki[i]);