BUG/MEDIUM: spoa/python: Fixing references to None
authorGilchrist Dadaglo <dadaglo@amazon.com>
Tue, 8 Dec 2020 14:37:14 +0000 (14:37 +0000)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 14 Dec 2020 08:31:16 +0000 (09:31 +0100)
commit30189a6e056799f38d57478b04baded0868a431b
tree28190bd1f55205ff2eac010f175a8feef3bb2521
parent789fb20542c76e14d68b916efe0dba6b012858b8
BUG/MEDIUM: spoa/python: Fixing references to None

As per https://docs.python.org/3/c-api/none.html, None has to be treated
exactly like other objects for reference counting.
So, when we use it, we need to INCREF and when we are done, DECREF

This patch must be backported as far as 2.0.

(cherry picked from commit bdd034947c4a3a6f8c41af9bf6e62b7a74b4ebbc)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
contrib/spoa_server/ps_python.c