From a2e3585e79c93b2372dbad46a744e28fcc6dad6d Mon Sep 17 00:00:00 2001 From: Zackery Spytz Date: Fri, 30 Nov 2018 00:40:16 -0700 Subject: [PATCH] bpo-35356: Fix a possible reference leak in nis.maps(). (GH-10808) --- Modules/nismodule.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Modules/nismodule.c b/Modules/nismodule.c index bc6796c278..a24978e068 100644 --- a/Modules/nismodule.c +++ b/Modules/nismodule.c @@ -412,6 +412,7 @@ nis_maps (PyObject *self, PyObject *args, PyObject *kwdict) PyObject *str = PyUnicode_FromString(maps->map); if (!str || PyList_Append(list, str) < 0) { + Py_XDECREF(str); Py_DECREF(list); list = NULL; break; -- 2.40.0