]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[2.7] bpo-25359: Add missed "goto error" after setting an exception. (GH-3712) (...
authorSerhiy Storchaka <storchaka@gmail.com>
Wed, 27 Sep 2017 05:44:03 +0000 (08:44 +0300)
committerGitHub <noreply@github.com>
Wed, 27 Sep 2017 05:44:03 +0000 (08:44 +0300)
(cherry picked from commit d6238a76c655e0feb13478505220dc9049f1682f)

Modules/_io/textio.c

index d9e036db386d3bfb51e49e266bebb89d2b15fa35..bf37f72bd11f26a788fc4310e5afd9cbecf4f7fc 100644 (file)
@@ -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 */