From c2138f3caad74c904e86121b22ee63e8495618bf Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 27 Nov 2008 00:10:04 +0000 Subject: [PATCH] Fix minor memory leak introduced in recent SQL-functions hacking: the DestReceiver created during postquel_start needs to be destroyed during postquel_end. In a moment of brain fade I had assumed this would be taken care of by FreeQueryDesc, but it's not (and shouldn't be). --- src/backend/executor/functions.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/backend/executor/functions.c b/src/backend/executor/functions.c index b34b90428e..988f704ad7 100644 --- a/src/backend/executor/functions.c +++ b/src/backend/executor/functions.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/executor/functions.c,v 1.128 2008/10/31 21:07:55 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/executor/functions.c,v 1.129 2008/11/27 00:10:04 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -501,6 +501,8 @@ postquel_end(execution_state *es) PopActiveSnapshot(); } + (*es->qd->dest->rDestroy) (es->qd->dest); + FreeQueryDesc(es->qd); es->qd = NULL; } -- 2.40.0