mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-12 06:24:56 +00:00
BUG/MINOR: contrib/spoa-server: Ensure ip address references are freed
IP addresses references passed in argument for ps_python are not freed after they have been used. Leading to a small chance of mem leak if a lot of ip addresses are passed around This patch must be backported as far as 2.0.
This commit is contained in:
parent
222f060be3
commit
9f0c984cf5
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user