diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2018-11-30 00:00:07 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-30 00:00:07 -0800 |
commit | e604b6c53e7dce6d4cf52525f4ae57352d489cba (patch) | |
tree | 27af9b528733ee9c601dfb8cc2190a4117f0b7a9 /Modules/nismodule.c | |
parent | 8a73cac618a050f4e74eb38ff43e48d9957a6dec (diff) | |
download | cpython-git-e604b6c53e7dce6d4cf52525f4ae57352d489cba.tar.gz |
bpo-35356: Fix a possible reference leak in nis.maps(). (GH-10808)
(cherry picked from commit a2e3585e79c93b2372dbad46a744e28fcc6dad6d)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Diffstat (limited to 'Modules/nismodule.c')
-rw-r--r-- | Modules/nismodule.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/nismodule.c b/Modules/nismodule.c index a9028bbfe5..11df679b74 100644 --- a/Modules/nismodule.c +++ b/Modules/nismodule.c @@ -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; |