Mercurial > hgrepos > FreeBSD > ports > www > uwsginl
changeset 84:67e3c22ae581
python: fix object leak in uwsgi.workers().
commit 7897276d014ac7ee81be39ecd9faf16ec4459f31
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Sun, 14 Jun 2020 23:06:03 +0200 |
| parents | 0ad8957eb3a9 |
| children | 56fc86d83f6f |
| files | uwsginl/files/patch-plugins_python_uwsgi__pymodule.c |
| diffstat | 1 files changed, 19 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uwsginl/files/patch-plugins_python_uwsgi__pymodule.c Sun Jun 14 23:06:03 2020 +0200 @@ -0,0 +1,19 @@ +--- plugins/python/uwsgi_pymodule.c.orig 2020-06-14 21:03:27 UTC ++++ plugins/python/uwsgi_pymodule.c +@@ -2167,8 +2167,6 @@ PyObject *py_uwsgi_workers(PyObject * self, PyObject * + goto clear; + } + +- apps_tuple = PyDict_GetItemString(worker_dict, "apps"); +- + PyDict_Clear(worker_dict); + + zero = PyInt_FromLong(uwsgi.workers[i + 1].id); +@@ -2325,6 +2323,7 @@ PyObject *py_uwsgi_workers(PyObject * self, PyObject * + + + PyDict_SetItemString(worker_dict, "apps", apps_tuple); ++ Py_DECREF(apps_tuple); + + } +
