Use mti_numreaders for loop limit, not me_maxreaders.
if (!env->me_txns) {
return func("(no reader locks)\n", ctx);
}
- rdrs = env->me_maxreaders;
+ rdrs = env->me_txns->mti_numreaders;
mr = env->me_txns->mti_readers;
for (i=0; i<rdrs; i++) {
if (mr[i].mr_pid) {
*dead = 0;
if (!env->me_txns)
return MDB_SUCCESS;
- rdrs = env->me_maxreaders;
+ rdrs = env->me_txns->mti_numreaders;
pids = malloc((rdrs+1) * sizeof(pid_t));
if (!pids)
return ENOMEM;