mirror of
https://github.com/postgres/postgres.git
synced 2025-04-21 12:05:57 +03:00
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:
parent
f43e295f68
commit
0852006a94
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user