Commit 0852006a authored by Jeff Davis's avatar Jeff Davis

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
parent f43e295f
...@@ -491,7 +491,7 @@ ltsReleaseBlock(LogicalTapeSet *lts, long blocknum) ...@@ -491,7 +491,7 @@ ltsReleaseBlock(LogicalTapeSet *lts, long blocknum)
* If the freelist becomes very large, just return and leak this free * If the freelist becomes very large, just return and leak this free
* block. * block.
*/ */
if (lts->freeBlocksLen * 2 > MaxAllocSize) if (lts->freeBlocksLen * 2 * sizeof(long) > MaxAllocSize)
return; return;
lts->freeBlocksLen *= 2; lts->freeBlocksLen *= 2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment