diff --git a/contrib/spoa_server/ps_python.c b/contrib/spoa_server/ps_python.c index 3ad64a7a7c..427ef18ee0 100644 --- a/contrib/spoa_server/ps_python.c +++ b/contrib/spoa_server/ps_python.c @@ -244,6 +244,8 @@ static PyObject *ps_python_set_var_ipv4(PyObject *self, PyObject *args) PyErr_SetString(spoa_error, "No space left available"); return NULL; } + /* Once we set the IP value in the worker, we don't need it anymore... */ + Py_XDECREF(value); return Py_None; } @@ -279,6 +281,8 @@ static PyObject *ps_python_set_var_ipv6(PyObject *self, PyObject *args) PyErr_SetString(spoa_error, "No space left available"); return NULL; } + /* Once we set the IP value in the worker, we don't need it anymore... */ + Py_XDECREF(value); return Py_None; }