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: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d6238a76c655e0feb13478505220dc9049f1682f;p=thirdparty%2FPython%2Fcpython.git bpo-25359: Add missed "goto error" after setting an exception. (#3712) --- diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c index 9b7334d3b54a..5239e8518e6a 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 */