]> git.sur5r.net Git - openldap/commitdiff
ITS#7987 fix excessive space for single write txn
authorLeo Yuriev <leo@yuriev.ru>
Fri, 5 Dec 2014 19:30:31 +0000 (19:30 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 5 Dec 2014 21:07:55 +0000 (21:07 +0000)
libraries/liblmdb/mdb.c

index 8d73105ba0aa464072ffda8e02b369e91ee163ec..0867af7f524a535ba14192d73e97f39aa1daaee0 100644 (file)
@@ -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);