Commit f3fe21a3 authored by Miss Islington (bot)'s avatar Miss Islington (bot) Committed by GitHub

bpo-35356: Fix a possible reference leak in nis.maps(). (GH-10808)

(cherry picked from commit a2e3585e)
Co-authored-by: default avatarZackery Spytz <zspytz@gmail.com>
parent f681e93e
...@@ -405,6 +405,7 @@ nis_maps (PyObject *self, PyObject *args, PyObject *kwdict) ...@@ -405,6 +405,7 @@ nis_maps (PyObject *self, PyObject *args, PyObject *kwdict)
PyObject *str = PyString_FromString(maps->map); PyObject *str = PyString_FromString(maps->map);
if (!str || PyList_Append(list, str) < 0) if (!str || PyList_Append(list, str) < 0)
{ {
Py_XDECREF(str);
Py_DECREF(list); Py_DECREF(list);
list = NULL; list = NULL;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment