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 72857482c1
commit 4a4f3bf983

View File

@ -489,7 +489,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;