pgsql: Fix memory leak in Memoize code - Mailing list pgsql-committers

From David Rowley
Subject pgsql: Fix memory leak in Memoize code
Date
Msg-id E1qoIpj-0007cK-F8@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Fix memory leak in Memoize code

Ensure we switch to the per-tuple memory context to prevent any memory
leaks of detoasted Datums in MemoizeHash_hash() and MemoizeHash_equal().

Reported-by: Orlov Aleksej
Author: Orlov Aleksej, David Rowley
Discussion: https://postgr.es/m/83281eed63c74e4f940317186372abfd%40cft.ru
Backpatch-through: 14, where Memoize was added

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/31b2b2d72d9c50be415c6340ebf4ad83a472590c

Modified Files
--------------
src/backend/executor/nodeMemoize.c | 25 ++++++++++++++++++++++---
1 file changed, 22 insertions(+), 3 deletions(-)


pgsql-committers by date:

Previous
From: David Rowley
Date:
Subject: pgsql: Fix memory leak in Memoize code
Next
From: David Rowley
Date:
Subject: pgsql: Fix memory leak in Memoize code