From: Tom Lane Date: Thu, 27 Nov 2008 00:10:04 +0000 (+0000) Subject: Fix minor memory leak introduced in recent SQL-functions hacking: the X-Git-Tag: recoveryinfrav9~282 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=12d47bc07b968ab1191be8c78677ee845018dc83;p=users%2Fsimon%2Fpostgres.git 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). --- diff --git a/src/backend/executor/functions.c b/src/backend/executor/functions.c index d7b3675540..29fae145cb 100644 --- a/src/backend/executor/functions.c +++ b/src/backend/executor/functions.c @@ -501,6 +501,8 @@ postquel_end(execution_state *es) PopActiveSnapshot(); } + (*es->qd->dest->rDestroy) (es->qd->dest); + FreeQueryDesc(es->qd); es->qd = NULL; }