]> 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:49:24 +0000 (01:49 +0000)
It was reporting spurious errors due to uninit'd cursors

libraries/liblmdb/mdb.c

index 12e8eff87f274a483f3e6a508b8e362380e28506..a4d2aad57aecce92fa3c33780fdabe2feabb0c69 100644 (file)
@@ -1604,7 +1604,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]);