mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #23099: Closing io.BytesIO with exported buffer is rejected now to
prevent corrupting exported buffer.
This commit is contained in:
parent
b5e8e57555
commit
c057c3859c
5 changed files with 23 additions and 7 deletions
|
@ -657,6 +657,7 @@ PyDoc_STRVAR(close_doc,
|
|||
static PyObject *
|
||||
bytesio_close(bytesio *self)
|
||||
{
|
||||
CHECK_EXPORTS(self);
|
||||
if (self->buf != NULL) {
|
||||
PyMem_Free(self->buf);
|
||||
self->buf = NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue