From f7f989d1b0144058090ded35e7a3e73ac3484737 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Sat, 12 Mar 2022 12:58:35 -0800 Subject: [PATCH] Fixed alloc [skip ci] --- src/ivfscan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ivfscan.c b/src/ivfscan.c index 970863a..1a8e33a 100644 --- a/src/ivfscan.c +++ b/src/ivfscan.c @@ -356,7 +356,7 @@ ivfflatbeginscan(Relation index, int nkeys, int norderbys) so->maxItems = 1024; so->itemCount = 0; so->itemQueue = pairingheap_allocate(CompareItems, scan); - so->items = palloc(sizeof(IvfflatScanItem) * so->maxItems + 1); + so->items = palloc(sizeof(IvfflatScanItem) * (so->maxItems + 1)); so->sortedItems = palloc(sizeof(IvfflatScanItem *) * so->maxItems); so->sortstate = NULL;