diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2000-05-21 02:28:55 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2000-05-21 02:28:55 +0000 |
| commit | 9dab9ab5e488e921ba6f948fa760566cd61e45a9 (patch) | |
| tree | 05b4b76d79ff2e3dcfb58ac64fc66eabcc4797ab /src/backend/access/heap/heapam.c | |
| parent | aa1617911836bd8f500320a365d59920fca2613b (diff) | |
| download | postgresql-9dab9ab5e488e921ba6f948fa760566cd61e45a9.tar.gz | |
Repair memory leaks that caused CacheCxt to grow without bound. We
really ought to fix relcache entry construction so that it does not
do so much with CurrentMemoryContext = CacheCxt. As is, relatively
harmless leaks in either sequential or index scanning translate to
permanent leaks if they occur when called from relcache build.
For the moment, however, the path of least resistance is to repair
all such leaks...
Diffstat (limited to 'src/backend/access/heap/heapam.c')
| -rw-r--r-- | src/backend/access/heap/heapam.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c index 29d6c9e0f9..e7a549d410 100644 --- a/src/backend/access/heap/heapam.c +++ b/src/backend/access/heap/heapam.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.67 2000/04/12 17:14:45 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.68 2000/05/21 02:28:54 tgl Exp $ * * * INTERFACE ROUTINES @@ -766,6 +766,9 @@ heap_endscan(HeapScanDesc scan) */ RelationDecrementReferenceCount(scan->rs_rd); + if (scan->rs_key) + pfree(scan->rs_key); + pfree(scan); } |
