mirror of
https://github.com/python/cpython.git
synced 2026-05-07 11:01:09 +00:00
bpo-35356: Fix a possible reference leak in nis.maps(). (GH-10808)
(cherry picked from commit a2e3585e79)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
This commit is contained in:
parent
8a73cac618
commit
e604b6c53e
1 changed files with 1 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue