BUG/MINOR: spoa/python: Cleanup ipaddress objects if initialization fails
authorGilchrist Dadaglo <dadaglo@amazon.com>
Tue, 8 Dec 2020 14:37:12 +0000 (14:37 +0000)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 9 Dec 2020 07:39:31 +0000 (08:39 +0100)
commitd1c0cf80bceb352b6bf33064b352f6dbe2b0b39c
tree4e9e09a995fffd889405f8bf3f8f40b2a9f7d6f5
parent132d8f61e9440b9254069ca2c4bcff67df29bb6f
BUG/MINOR: spoa/python: Cleanup ipaddress objects if initialization fails

This change is to ensure objects from the ipaddress module are cleaned
up when spoa module initialization fails.
In general the interpreter would just crash, but in a code where import
is conditional (try/except), then we would keep those objects around

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