# HG changeset patch # User Franz Glasner # Date 1592168763 -7200 # Node ID 67e3c22ae5818f04d9a2842a7513c4eb651d3744 # Parent 0ad8957eb3a979d68d6e9fc83fd0313dbb633e16 python: fix object leak in uwsgi.workers(). commit 7897276d014ac7ee81be39ecd9faf16ec4459f31 diff -r 0ad8957eb3a9 -r 67e3c22ae581 uwsginl/files/patch-plugins_python_uwsgi__pymodule.c --- /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); + + } +