Fix leak in _fileio.c (patch by Hirokazu Yamamoto)

This commit is contained in:
Antoine Pitrou 2009-03-29 18:40:13 +00:00
parent b40b947c86
commit 8e21fb2c69

View File

@ -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);