BUG/MAJOR: contrib/spoa-server: Fix unhandled python call leading to memory leak
authorGilchrist Dadaglo <dadaglo@amazon.com>
Mon, 24 Aug 2020 19:21:31 +0000 (19:21 +0000)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 1 Sep 2020 16:28:16 +0000 (18:28 +0200)
commit222f060be379126fa0890f6cd2820c4bd8d5ac90
tree81564bb5ad7c7605fc1e6da95fd8fbe5d24f48b7
parentae2132cffbc3a3c43fe2b020cf3a7318a83b6e36
BUG/MAJOR: contrib/spoa-server: Fix unhandled python call leading to memory leak

The result from spoa evaluation of the user provided python code is
never passed back to the main spoa process nor freed.
Same for the keyword list passed.
This results into the elements never freed by Python as reference count
never goes down.
https://docs.python.org/3/extending/extending.html#reference-counting-in-python

This patch must be backported as far as 2.0.
contrib/spoa_server/ps_python.c