From 8e21fb2c69687717f6980e545f54b293c3cf606d Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Sun, 29 Mar 2009 18:40:13 +0000 Subject: [PATCH] Fix leak in _fileio.c (patch by Hirokazu Yamamoto) --- Modules/_fileio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Modules/_fileio.c b/Modules/_fileio.c index c6b97fbaf61..c3124db3356 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);