]> granicus.if.org Git - python/commitdiff
[3.6] bpo-25359: Add missed "goto error" after setting an exception. (GH-3712) (...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 24 Sep 2017 00:29:17 +0000 (17:29 -0700)
committerSerhiy Storchaka <storchaka@gmail.com>
Sun, 24 Sep 2017 00:29:17 +0000 (03:29 +0300)
(cherry picked from commit d6238a76c655e0feb13478505220dc9049f1682f)

Modules/_io/textio.c

index 588c6977691cfc780a3b9d3d38d3a6a3bfb7d60a..4638b4759701f84887909c6fa38a9af66046e3fe 100644 (file)
@@ -943,6 +943,7 @@ _io_TextIOWrapper___init___impl(textio *self, PyObject *buffer,
     else {
         PyErr_SetString(PyExc_IOError,
                         "could not determine default encoding");
+        goto error;
     }
 
     /* Check we have been asked for a real text encoding */