Skip to content

Commit a2e3585

Browse files
ZackerySpytzserhiy-storchaka
authored andcommitted
bpo-35356: Fix a possible reference leak in nis.maps(). (GH-10808)
1 parent 9724348 commit a2e3585

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Modules/nismodule.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,7 @@ nis_maps (PyObject *self, PyObject *args, PyObject *kwdict)
412412
PyObject *str = PyUnicode_FromString(maps->map);
413413
if (!str || PyList_Append(list, str) < 0)
414414
{
415+
Py_XDECREF(str);
415416
Py_DECREF(list);
416417
list = NULL;
417418
break;

0 commit comments

Comments
 (0)