Fix bogus MaxAllocSize check in logtape.c.

Reported-by: Peter Geoghegan
Discussion: https://postgr.es/m/CAH2-Wz=NZPZc3-fkdmvu=w2itx0PiB-G6QpxHXZOjuvFAzPdZw@mail.gmail.com
Backpatch-through: 13
This commit is contained in:
Jeff Davis 2020-09-04 12:01:58 -07:00
parent f43e295f68
commit 0852006a94
1 changed files with 1 additions and 1 deletions

View File

@ -491,7 +491,7 @@ ltsReleaseBlock(LogicalTapeSet *lts, long blocknum)
* If the freelist becomes very large, just return and leak this free
* block.
*/
if (lts->freeBlocksLen * 2 > MaxAllocSize)
if (lts->freeBlocksLen * 2 * sizeof(long) > MaxAllocSize)
return;
lts->freeBlocksLen *= 2;