From: Howard Chu Date: Sat, 14 May 2016 23:44:54 +0000 (+0100) Subject: ITS#8424 init cursor in mdb_env_cwalk X-Git-Tag: LMDB_0.9.19~42 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b785bfbe61d041e6b175f8f87915ec6d3e636988;p=openldap ITS#8424 init cursor in mdb_env_cwalk --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index fdba20fe64..169f9d7be7 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -8890,7 +8890,7 @@ mdb_env_cthr_toggle(mdb_copy *my, int st) static int ESECT mdb_env_cwalk(mdb_copy *my, pgno_t *pg, int flags) { - MDB_cursor mc; + MDB_cursor mc = {0}; MDB_txn *txn = my->mc_txn; MDB_node *ni; MDB_page *mo, *mp, *leaf; @@ -8903,7 +8903,6 @@ mdb_env_cwalk(mdb_copy *my, pgno_t *pg, int flags) return MDB_SUCCESS; mc.mc_snum = 1; - mc.mc_top = 0; mc.mc_txn = txn; rc = mdb_page_get(my->mc_txn, *pg, &mc.mc_pg[0], NULL);