]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix memory leak in Memoize code
authorDavid Rowley <drowley@postgresql.org>
Thu, 5 Oct 2023 07:32:14 +0000 (20:32 +1300)
committerDavid Rowley <drowley@postgresql.org>
Thu, 5 Oct 2023 07:32:14 +0000 (20:32 +1300)
commite4b95b9b02b24c752210839304891e855176e394
tree62a7dba30510bd95fe9382ca2acc7c9a4c7eb9ab
parentf91c87b31463d2e368189ca35aaefc07b54aeef1
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
src/backend/executor/nodeMemoize.c