diff options
Diffstat (limited to 'src/backend/access/gist/gistscan.c')
-rw-r--r-- | src/backend/access/gist/gistscan.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/backend/access/gist/gistscan.c b/src/backend/access/gist/gistscan.c index aed3e95b4e3..aa9f2c036bc 100644 --- a/src/backend/access/gist/gistscan.c +++ b/src/backend/access/gist/gistscan.c @@ -135,12 +135,15 @@ gistendscan(PG_FUNCTION_ARGS) { gistfreestack(so->stack); if (so->giststate != NULL) + { freeGISTstate(so->giststate); + pfree(so->giststate); + } /* drop pins on buffers -- we aren't holding any locks */ if (BufferIsValid(so->curbuf)) ReleaseBuffer(so->curbuf); MemoryContextDelete(so->tempCxt); - pfree(scan->opaque); + pfree(so); } PG_RETURN_VOID(); |