summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2008-11-30 18:49:48 +0000
committerTom Lane2008-11-30 18:49:48 +0000
commit38970b5775cc93d51e97247646b50a0d045f3b6e (patch)
treed7d91b2eeac2edf56f04acb0e7f0e22e9237305f
parent20a1fad809eafe5dd2a55918939b1ab759dc307b (diff)
Remove inappropriate memory context switch in shutdown_MultiFuncCall().
This was a thinko introduced in a patch from last February; it results in memory leakage if an SRF is shut down before the actual end of query, because subsequent code will be running in a longer-lived context than it's expecting to be.
-rw-r--r--src/backend/utils/fmgr/funcapi.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/backend/utils/fmgr/funcapi.c b/src/backend/utils/fmgr/funcapi.c
index 2b3127131b..1e823097f2 100644
--- a/src/backend/utils/fmgr/funcapi.c
+++ b/src/backend/utils/fmgr/funcapi.c
@@ -182,7 +182,6 @@ shutdown_MultiFuncCall(Datum arg)
* Delete context that holds all multi-call data, including the
* FuncCallContext itself
*/
- MemoryContextSwitchTo(flinfo->fn_mcxt);
MemoryContextDelete(funcctx->multi_call_memory_ctx);
}