summaryrefslogtreecommitdiff
path: root/src/backend/access/gin/ginget.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/access/gin/ginget.c')
-rw-r--r--src/backend/access/gin/ginget.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/access/gin/ginget.c b/src/backend/access/gin/ginget.c
index 0d4108d05a3..b3e2e9d5f6e 100644
--- a/src/backend/access/gin/ginget.c
+++ b/src/backend/access/gin/ginget.c
@@ -552,7 +552,7 @@ startScanKey(GinState *ginstate, GinScanOpaque so, GinScanKey key)
{
MemoryContextSwitchTo(so->tempCtx);
- entryIndexes = (int *) palloc(sizeof(int) * key->nentries);
+ entryIndexes = palloc_array(int, key->nentries);
for (i = 0; i < key->nentries; i++)
entryIndexes[i] = i;
qsort_arg(entryIndexes, key->nentries, sizeof(int),
@@ -1873,7 +1873,7 @@ scanPendingInsert(IndexScanDesc scan, TIDBitmap *tbm, int64 *ntids)
LockBuffer(pos.pendingBuffer, GIN_SHARE);
pos.firstOffset = FirstOffsetNumber;
UnlockReleaseBuffer(metabuffer);
- pos.hasMatchKey = palloc(sizeof(bool) * so->nkeys);
+ pos.hasMatchKey = palloc_array(bool, so->nkeys);
/*
* loop for each heap row. scanGetCandidate returns full row or row's