Commit 8e21fb2c authored by Antoine Pitrou's avatar Antoine Pitrou

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

parent b40b947c
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment