diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-02-09 20:02:37 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2017-02-09 20:02:37 +0200 |
commit | a4629c57a42d092ec150f5f90fc12bb795fc8153 (patch) | |
tree | d9cddae86a2ac74315b4b030959ca731e0d1a238 /Modules | |
parent | c6180bb73c8c7c7f9d8ea9816487b710597b6fc1 (diff) | |
download | cpython-a4629c57a42d092ec150f5f90fc12bb795fc8153.tar.gz |
Issue #29513: Fixed a reference leak in os.scandir() added in issue #29034.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/posixmodule.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index dc3fb94c87..8f8ba255ec 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -11865,7 +11865,6 @@ ScandirIterator_finalize(ScandirIterator *iterator) } } - Py_CLEAR(iterator->path.object); path_cleanup(&iterator->path); /* Restore the saved exception. */ @@ -11969,12 +11968,6 @@ posix_scandir(PyObject *self, PyObject *args, PyObject *kwargs) path_converter, &iterator->path)) goto error; - /* path_converter doesn't keep path.object around, so do it - manually for the lifetime of the iterator here (the refcount - is decremented in ScandirIterator_dealloc) - */ - Py_XINCREF(iterator->path.object); - #ifdef MS_WINDOWS iterator->first_time = 1; |