summaryrefslogtreecommitdiff
path: root/src/backend/utils
diff options
context:
space:
mode:
authorTom Lane2001-01-29 00:39:20 +0000
committerTom Lane2001-01-29 00:39:20 +0000
commit0d54d6ac44444c05f7c0f5058d3d3f32cc188b48 (patch)
treecccee5d61e1afc1982c363ed3e4876a09ed82b52 /src/backend/utils
parent51cd0377460839d25a5fc5f2a2499de43126a3b2 (diff)
Clean up handling of tuple descriptors so that result-tuple descriptors
allocated by plan nodes are not leaked at end of query. This doesn't really matter for normal queries, but it sure does for queries invoked repetitively inside SQL functions. Clean up some other grotty code associated with tupdescs, and fix a few other memory leaks exposed by tests with simple SQL functions.
Diffstat (limited to 'src/backend/utils')
-rw-r--r--src/backend/utils/sort/tuplesort.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c
index 7808f297649..6dbcc701290 100644
--- a/src/backend/utils/sort/tuplesort.c
+++ b/src/backend/utils/sort/tuplesort.c
@@ -78,7 +78,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/sort/tuplesort.c,v 1.12 2001/01/24 19:43:18 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/sort/tuplesort.c,v 1.13 2001/01/29 00:39:19 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -546,6 +546,7 @@ tuplesort_end(Tuplesortstate *state)
}
if (state->memtupindex)
pfree(state->memtupindex);
+ pfree(state);
}
/*