commit | 2a7feee76d054ca8dfbcb1b6e0569b5856cf18a3 | [log] [tgz] |
---|---|---|
author | Stefan Krah <stefan@bytereef.org> | Sat Nov 27 22:06:49 2010 +0000 |
committer | Stefan Krah <stefan@bytereef.org> | Sat Nov 27 22:06:49 2010 +0000 |
tree | 2e43895137aa2b35635eec1dfebb87984c01d2c4 | |
parent | e71362d3dee9de626abb7d2d564550b5e59a1151 [diff] |
Windows: fix leak in posix_listdir.
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 @@ } 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 != ':')