diff options
author | Stefan Krah <stefan@bytereef.org> | 2010-11-27 22:06:49 (GMT) |
---|---|---|
committer | Stefan Krah <stefan@bytereef.org> | 2010-11-27 22:06:49 (GMT) |
commit | 2a7feee76d054ca8dfbcb1b6e0569b5856cf18a3 (patch) | |
tree | 2e43895137aa2b35635eec1dfebb87984c01d2c4 /Modules | |
parent | e71362d3dee9de626abb7d2d564550b5e59a1151 (diff) | |
download | cpython-2a7feee76d054ca8dfbcb1b6e0569b5856cf18a3.zip cpython-2a7feee76d054ca8dfbcb1b6e0569b5856cf18a3.tar.gz cpython-2a7feee76d054ca8dfbcb1b6e0569b5856cf18a3.tar.bz2 |
Windows: fix leak in posix_listdir.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/posixmodule.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index be99be8..3197a0d 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -2396,6 +2396,7 @@ posix_listdir(PyObject *self, PyObject *args) } strcpy(namebuf, PyBytes_AsString(opath)); len = PyObject_Size(opath); + Py_DECREF(opath); if (len > 0) { char ch = namebuf[len-1]; if (ch != SEP && ch != ALTSEP && ch != ':') |