mirror of
https://github.com/python/cpython.git
synced 2024-11-29 12:54:02 +08:00
Fix leak in _fileio.c (patch by Hirokazu Yamamoto)
This commit is contained in:
parent
b40b947c86
commit
8e21fb2c69
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user