Issue #18408: Fix fileio_read() on _PyBytes_Resize() failure

bytes is NULL on _PyBytes_Resize() failure
This commit is contained in:
Victor Stinner 2013-07-16 21:36:02 +02:00
parent 8361617fad
commit 85c761d3d3
1 changed files with 1 additions and 1 deletions

View File

@ -739,7 +739,7 @@ fileio_read(fileio *self, PyObject *args)
if (n != size) {
if (_PyBytes_Resize(&bytes, n) < 0) {
Py_DECREF(bytes);
Py_CLEAR(bytes);
return NULL;
}
}