Skip to content

Commit c2138f3

Browse files
committed
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).
1 parent 9858a8c commit c2138f3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/backend/executor/functions.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/executor/functions.c,v 1.128 2008/10/31 21:07:55 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/executor/functions.c,v 1.129 2008/11/27 00:10:04 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -501,6 +501,8 @@ postquel_end(execution_state *es)
501501
PopActiveSnapshot();
502502
}
503503

504+
(*es->qd->dest->rDestroy) (es->qd->dest);
505+
504506
FreeQueryDesc(es->qd);
505507
es->qd = NULL;
506508
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy