summaryrefslogtreecommitdiff
path: root/src/backend/access/common/toast_internals.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/access/common/toast_internals.c')
-rw-r--r--src/backend/access/common/toast_internals.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/access/common/toast_internals.c b/src/backend/access/common/toast_internals.c
index 63b848473f8..d06af82de15 100644
--- a/src/backend/access/common/toast_internals.c
+++ b/src/backend/access/common/toast_internals.c
@@ -568,7 +568,7 @@ toast_open_indexes(Relation toastrel,
*num_indexes = list_length(indexlist);
/* Open all the index relations */
- *toastidxs = (Relation *) palloc(*num_indexes * sizeof(Relation));
+ *toastidxs = palloc_array(Relation, *num_indexes);
foreach(lc, indexlist)
(*toastidxs)[i++] = index_open(lfirst_oid(lc), lock);