]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-111942: Remove an extra incref in textiowrapper_change_encoding (#126542)
authorPetr Viktorin <encukou@gmail.com>
Fri, 8 Nov 2024 12:26:57 +0000 (13:26 +0100)
committerGitHub <noreply@github.com>
Fri, 8 Nov 2024 12:26:57 +0000 (13:26 +0100)
Modules/_io/textio.c

index ba69e2afd275704a1c37ad5dbd8fff7d77dc660c..e9dd85f1ea18508158970444f3abf71462b536df 100644 (file)
@@ -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);