Обсуждение: pgsql: Fix memory leak in Memoize code

Поиск
Список
Период
Сортировка

pgsql: Fix memory leak in Memoize code

От
David Rowley
Дата:
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_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/e4b95b9b02b24c752210839304891e855176e394

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