From: Howard Chu Date: Mon, 8 Apr 2013 02:21:46 +0000 (-0700) Subject: Fix 227329c8e1fb818548f1936f5dc1349ffd73352 X-Git-Tag: OPENLDAP_REL_ENG_2_4_36~89^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=fbe6a6051b180bb7e07a393abeced80d5c7932c2;p=openldap Fix 227329c8e1fb818548f1936f5dc1349ffd73352 mdb_dbi_close() must allow any dbi < maxdbs, since opens in an uncommitted txn don't increment env->me_numdbs. --- 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;