summaryrefslogtreecommitdiffstats
path: root/Modules/_fileio.c
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2009-03-29 18:40:13 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2009-03-29 18:40:13 (GMT)
commit8e21fb2c69687717f6980e545f54b293c3cf606d (patch)
tree0f0fbf8505113a756d80d8f423438b0409840690 /Modules/_fileio.c
parentb40b947c864e42e81718be1384110a1ac66f1a96 (diff)
downloadcpython-8e21fb2c69687717f6980e545f54b293c3cf606d.zip
cpython-8e21fb2c69687717f6980e545f54b293c3cf606d.tar.gz
cpython-8e21fb2c69687717f6980e545f54b293c3cf606d.tar.bz2
Fix leak in _fileio.c (patch by Hirokazu Yamamoto)
Diffstat (limited to 'Modules/_fileio.c')
-rw-r--r--Modules/_fileio.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/_fileio.c b/Modules/_fileio.c
index c6b97fb..c3124db 100644
--- a/Modules/_fileio.c
+++ b/Modules/_fileio.c
@@ -622,6 +622,7 @@ fileio_read(PyFileIOObject *self, PyObject *args)
n = -1;
if (n < 0) {
+ Py_DECREF(bytes);
if (errno == EAGAIN)
Py_RETURN_NONE;
PyErr_SetFromErrno(PyExc_IOError);