Commit a2e3585e authored by Zackery Spytz's avatar Zackery Spytz Committed by Serhiy Storchaka

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

parent 9724348b
......@@ -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;
......
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