mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
fix possible double free in TextIOWrapper.__init__ (closes #22849)
This commit is contained in:
parent
dfede95a06
commit
6c14f23100
3 changed files with 18 additions and 1 deletions
|
@ -1061,7 +1061,7 @@ textiowrapper_init(textio *self, PyObject *args, PyObject *kwds)
|
|||
}
|
||||
|
||||
/* Finished sorting out the codec details */
|
||||
Py_DECREF(codec_info);
|
||||
Py_CLEAR(codec_info);
|
||||
|
||||
self->buffer = buffer;
|
||||
Py_INCREF(buffer);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue