diff options
Diffstat (limited to 'src')
| -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 a53d8cd0873..0fa8814e3a5 100644 --- a/src/backend/access/gist/gistscan.c +++ b/src/backend/access/gist/gistscan.c @@ -138,12 +138,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(); | 
