diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2008-11-30 18:49:48 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2008-11-30 18:49:48 +0000 |
commit | 25a4f1afec301b8358cde28099b68bf43f18d5b4 (patch) | |
tree | b4f5ee599b81d02441f022d16c356710678e5ed5 /src | |
parent | 66156f24321d15eb5d1a7a24505493214dd7f90f (diff) | |
download | postgresql-25a4f1afec301b8358cde28099b68bf43f18d5b4.tar.gz postgresql-25a4f1afec301b8358cde28099b68bf43f18d5b4.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/utils/fmgr/funcapi.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/backend/utils/fmgr/funcapi.c b/src/backend/utils/fmgr/funcapi.c index ac8ef5482ae..86b26816395 100644 --- a/src/backend/utils/fmgr/funcapi.c +++ b/src/backend/utils/fmgr/funcapi.c @@ -7,7 +7,7 @@ * Copyright (c) 2002-2006, PostgreSQL Global Development Group * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/fmgr/funcapi.c,v 1.31.2.1 2008/02/29 02:49:47 neilc Exp $ + * $PostgreSQL: pgsql/src/backend/utils/fmgr/funcapi.c,v 1.31.2.2 2008/11/30 18:49:48 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -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); } |