mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-18 11:05:48 +08:00
ITS#7987 fix excessive space for single write txn
This commit is contained in:
parent
f284c3232d
commit
196e07ca58
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user