mirror of
https://github.com/python/cpython
synced 2024-09-06 03:03:36 +00:00
bpo-35356: Fix a possible reference leak in nis.maps(). (GH-10808)
This commit is contained in:
parent
9724348b43
commit
a2e3585e79
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue