Skip to content

Commit 7e32cee

Browse files
miss-islingtonserhiy-storchaka
authored andcommitted
[3.6] bpo-25359: Add missed "goto error" after setting an exception. (GH-3712) (#3714)
(cherry picked from commit d6238a7)
1 parent b650194 commit 7e32cee

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Modules/_io/textio.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -943,6 +943,7 @@ _io_TextIOWrapper___init___impl(textio *self, PyObject *buffer,
943943
else {
944944
PyErr_SetString(PyExc_IOError,
945945
"could not determine default encoding");
946+
goto error;
946947
}
947948

948949
/* Check we have been asked for a real text encoding */

0 commit comments

Comments
 (0)