From: Serhiy Storchaka Date: Sat, 23 Sep 2017 23:49:58 +0000 (+0300) Subject: bpo-25359: Add missed "goto error" after setting an exception. (#3712) X-Git-Tag: v3.7.0a2~129 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d6238a76c655e0feb13478505220dc9049f1682f;p=python bpo-25359: Add missed "goto error" after setting an exception. (#3712) --- diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c index 9b7334d3b5..5239e8518e 100644 --- a/Modules/_io/textio.c +++ b/Modules/_io/textio.c @@ -941,6 +941,7 @@ _io_TextIOWrapper___init___impl(textio *self, PyObject *buffer, else { PyErr_SetString(PyExc_OSError, "could not determine default encoding"); + goto error; } /* Check we have been asked for a real text encoding */