Thread: pgsql: exec_eval_datum leaks memory when dealing with ROW or REC values.

pgsql: exec_eval_datum leaks memory when dealing with ROW or REC values.

From
tgl@svr1.postgresql.org (Tom Lane)
Date:
Log Message:
-----------
exec_eval_datum leaks memory when dealing with ROW or REC values.
It never leaked memory before PG 8.0, so none of the callers are
expecting this.  Cleanest fix seems to be to make it allocate the needed
memory in estate->eval_econtext, where it will be cleaned up by
the next exec_eval_cleanup.  Per report from Bill Rugolsky.

Tags:
----
REL8_0_STABLE

Modified Files:
--------------
    pgsql/src/pl/plpgsql/src:
        pl_exec.c (r1.127.4.2 -> r1.127.4.3)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/pl_exec.c.diff?r1=1.127.4.2&r2=1.127.4.3)