BUG/MINOR: spoa/python: Cleanup references for failed Module Addobject operations
authorGilchrist Dadaglo <dadaglo@amazon.com>
Tue, 8 Dec 2020 14:37:11 +0000 (14:37 +0000)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 9 Dec 2020 07:39:31 +0000 (08:39 +0100)
commit132d8f61e9440b9254069ca2c4bcff67df29bb6f
treea2b8931f252cc47be5a8c155f49b998c5886701b
parentc7485ac1013e32e79d692230a65be082c995f683
BUG/MINOR: spoa/python: Cleanup references for failed Module Addobject operations

As per https://docs.python.org/3/c-api/module.html#c.PyModule_AddObject,
references are stolen by the function only for success. We must do
cleanup manually if there is a failure

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