Skip to content

Commit

Permalink
bpo-35356: Fix a possible reference leak in nis.maps(). (GH-10808)
Browse files Browse the repository at this point in the history
(cherry picked from commit a2e3585)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
  • Loading branch information
miss-islington and ZackerySpytz committed Nov 30, 2018
1 parent f681e93 commit f3fe21a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Modules/nismodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ nis_maps (PyObject *self, PyObject *args, PyObject *kwdict)
PyObject *str = PyString_FromString(maps->map);
if (!str || PyList_Append(list, str) < 0)
{
Py_XDECREF(str);
Py_DECREF(list);
list = NULL;
break;
Expand Down

0 comments on commit f3fe21a

Please sign in to comment.