From fbe6a6051b180bb7e07a393abeced80d5c7932c2 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sun, 7 Apr 2013 19:21:46 -0700 Subject: [PATCH] Fix 227329c8e1fb818548f1936f5dc1349ffd73352 mdb_dbi_close() must allow any dbi < maxdbs, since opens in an uncommitted txn don't increment env->me_numdbs. --- libraries/liblmdb/mdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index cb3bbf540d..8a2875cf08 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -7168,7 +7168,7 @@ int mdb_stat(MDB_txn *txn, MDB_dbi dbi, MDB_stat *arg) void mdb_dbi_close(MDB_env *env, MDB_dbi dbi) { char *ptr; - if (dbi <= MAIN_DBI || dbi >= env->me_numdbs) + if (dbi <= MAIN_DBI || dbi >= env->me_maxdbs) return; ptr = env->me_dbxs[dbi].md_name.mv_data; env->me_dbxs[dbi].md_name.mv_data = NULL; -- 2.39.5