From: Petr Viktorin Date: Fri, 8 Nov 2024 12:26:57 +0000 (+0100) Subject: [3.11] gh-111942: Remove an extra incref in textiowrapper_change_encoding (#126542) X-Git-Tag: v3.11.11~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e33b6fccd3969dc2351f6a64d7b0362c36c2be96;p=thirdparty%2FPython%2Fcpython.git [3.11] gh-111942: Remove an extra incref in textiowrapper_change_encoding (#126542) --- diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c index ba69e2afd275..e9dd85f1ea18 100644 --- a/Modules/_io/textio.c +++ b/Modules/_io/textio.c @@ -1313,7 +1313,6 @@ textiowrapper_change_encoding(textio *self, PyObject *encoding, } Py_DECREF(codec_info); - Py_INCREF(errors); Py_SETREF(self->encoding, encoding); Py_SETREF(self->errors, errors);