From: Howard Chu Date: Mon, 23 Nov 2015 01:10:05 +0000 (+0000) Subject: ITS#8321 fix mdb_cursor_chk() X-Git-Tag: LMDB_0.9.17~24 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0ec3967e1d655d8a9601768a6a9372da5ee875b5;p=openldap ITS#8321 fix mdb_cursor_chk() It was reporting spurious errors due to uninit'd cursors --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 12e8eff87f..a4d2aad57a 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -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; imc_top; i++) { mp = mc->mc_pg[i]; node = NODEPTR(mp, mc->mc_ki[i]);