diff options
Diffstat (limited to 'contrib/hstore/hstore_gist.c')
| -rw-r--r-- | contrib/hstore/hstore_gist.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/hstore/hstore_gist.c b/contrib/hstore/hstore_gist.c index 69515dc3d3f..36825ef867b 100644 --- a/contrib/hstore/hstore_gist.c +++ b/contrib/hstore/hstore_gist.c @@ -175,7 +175,7 @@ ghstore_compress(PG_FUNCTION_ARGS) } } - retval = (GISTENTRY *) palloc(sizeof(GISTENTRY)); + retval = palloc_object(GISTENTRY); gistentryinit(*retval, PointerGetDatum(res), entry->rel, entry->page, entry->offset, @@ -195,7 +195,7 @@ ghstore_compress(PG_FUNCTION_ARGS) res = ghstore_alloc(true, siglen, NULL); - retval = (GISTENTRY *) palloc(sizeof(GISTENTRY)); + retval = palloc_object(GISTENTRY); gistentryinit(*retval, PointerGetDatum(res), entry->rel, entry->page, entry->offset, @@ -429,7 +429,7 @@ ghstore_picksplit(PG_FUNCTION_ARGS) maxoff = OffsetNumberNext(maxoff); /* sort before ... */ - costvector = (SPLITCOST *) palloc(sizeof(SPLITCOST) * maxoff); + costvector = palloc_array(SPLITCOST, maxoff); for (j = FirstOffsetNumber; j <= maxoff; j = OffsetNumberNext(j)) { costvector[j - 1].pos = j; |
