From: Leo Yuriev Date: Fri, 5 Dec 2014 19:30:31 +0000 (+0000) Subject: ITS#7987 fix excessive space for single write txn X-Git-Tag: LMDB_0.9.15~49 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=196e07ca587874c602a1ae358d97c7b6b765c94e;p=openldap ITS#7987 fix excessive space for single write txn --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 8d73105ba0..0867af7f52 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -4543,7 +4543,7 @@ mdb_env_open(MDB_env *env, const char *path, unsigned int flags, mdb_mode_t mode if (!(flags & MDB_RDONLY)) { MDB_txn *txn; int tsize = sizeof(MDB_txn), size = tsize + env->me_maxdbs * - (sizeof(MDB_db)+sizeof(MDB_cursor)+sizeof(unsigned int)+1); + (sizeof(MDB_db)+sizeof(MDB_cursor *)+sizeof(unsigned int)+1); txn = calloc(1, size); if (txn) { txn->mt_dbs = (MDB_db *)((char *)txn + tsize);