Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 4a4f3bf

Browse files
committed
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
1 parent 7285748 commit 4a4f3bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/utils/sort/logtape.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ ltsReleaseBlock(LogicalTapeSet *lts, long blocknum)
489489
* If the freelist becomes very large, just return and leak this free
490490
* block.
491491
*/
492-
if (lts->freeBlocksLen * 2 > MaxAllocSize)
492+
if (lts->freeBlocksLen * 2 * sizeof(long) > MaxAllocSize)
493493
return;
494494

495495
lts->freeBlocksLen *= 2;

0 commit comments

Comments
 (0)