diff options
author | Benjamin Peterson <benjamin@python.org> | 2014-11-12 15:19:46 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2014-11-12 15:19:46 (GMT) |
commit | 6c14f231005a2a3a63bd4b0157c908e94bd834ac (patch) | |
tree | 8d1e7e34b0f8b26dd89272091636bd34dce0104d /Modules/_io/textio.c | |
parent | dfede95a069d418c91a26d5999958b525172e687 (diff) | |
download | cpython-6c14f231005a2a3a63bd4b0157c908e94bd834ac.zip cpython-6c14f231005a2a3a63bd4b0157c908e94bd834ac.tar.gz cpython-6c14f231005a2a3a63bd4b0157c908e94bd834ac.tar.bz2 |
fix possible double free in TextIOWrapper.__init__ (closes #22849)
Diffstat (limited to 'Modules/_io/textio.c')
-rw-r--r-- | Modules/_io/textio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c index a3e82a8..4555bf7 100644 --- a/Modules/_io/textio.c +++ b/Modules/_io/textio.c @@ -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); |