From: Serhiy Storchaka Date: Wed, 27 Sep 2017 05:44:03 +0000 (+0300) Subject: [2.7] bpo-25359: Add missed "goto error" after setting an exception. (GH-3712) (... X-Git-Tag: v2.7.15rc1~188 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4954b8dc5305de72ce618522522a2910c3a34126;p=thirdparty%2FPython%2Fcpython.git [2.7] bpo-25359: Add missed "goto error" after setting an exception. (GH-3712) (#3779) (cherry picked from commit d6238a76c655e0feb13478505220dc9049f1682f) --- diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c index d9e036db386d..bf37f72bd11f 100644 --- a/Modules/_io/textio.c +++ b/Modules/_io/textio.c @@ -907,6 +907,7 @@ textiowrapper_init(textio *self, PyObject *args, PyObject *kwds) else { PyErr_SetString(PyExc_IOError, "could not determine default encoding"); + goto error; } /* Check we have been asked for a real text encoding */