diff options
author | Neil Conway | 2005-05-21 12:08:06 +0000 |
---|---|---|
committer | Neil Conway | 2005-05-21 12:08:06 +0000 |
commit | 36ab6005119532903d4ce3ad564e6576bd7698b8 (patch) | |
tree | fb6f1c25a78b5fe285a7496c4893565b76c5893f /contrib/tsearch/gistidx.c | |
parent | 875813439d0659a2adacc54409793a793f959ea7 (diff) |
Cleanup of GiST extensions in contrib/: now that we always invoke GiST
methods in a short-lived memory context, there is no need for GiST methods
to do their own manual (and error-prone) memory management.
Diffstat (limited to 'contrib/tsearch/gistidx.c')
-rw-r--r-- | contrib/tsearch/gistidx.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/contrib/tsearch/gistidx.c b/contrib/tsearch/gistidx.c index 25b0d8d1e9..c1e1e627fb 100644 --- a/contrib/tsearch/gistidx.c +++ b/contrib/tsearch/gistidx.c @@ -123,7 +123,6 @@ gtxtidx_compress(PG_FUNCTION_ARGS) if (entry->leafkey) { /* txtidx */ GISTTYPE *res; - txtidx *toastedval = (txtidx *) DatumGetPointer(entry->key); txtidx *val = (txtidx *) DatumGetPointer(PG_DETOAST_DATUM(entry->key)); int4 len; int4 *arr; @@ -154,8 +153,6 @@ gtxtidx_compress(PG_FUNCTION_ARGS) res = (GISTTYPE *) repalloc((void *) res, len); res->len = len; } - if (val != toastedval) - pfree(val); /* make signature, if array is too long */ if (res->len > TOAST_INDEX_TARGET) @@ -167,7 +164,6 @@ gtxtidx_compress(PG_FUNCTION_ARGS) ressign->len = len; ressign->flag = SIGNKEY; makesign(GETSIGN(ressign), res); - pfree(res); res = ressign; } @@ -780,8 +776,6 @@ gtxtidx_picksplit(PG_FUNCTION_ARGS) } *right = *left = FirstOffsetNumber; - pfree(costvector); - pfree(cache); v->spl_ldatum = PointerGetDatum(datum_l); v->spl_rdatum = PointerGetDatum(datum_r); |