mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #18408: Fix fileio_read() on _PyBytes_Resize() failure
bytes is NULL on _PyBytes_Resize() failure
This commit is contained in:
parent
8361617fad
commit
85c761d3d3
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue