From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Sun, 24 Sep 2017 00:29:17 +0000 (-0700) Subject: [3.6] bpo-25359: Add missed "goto error" after setting an exception. (GH-3712) (... X-Git-Tag: v3.6.4rc1~232 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7e32cee1a68a489c4f2e916ac7003004b51887de;p=python [3.6] bpo-25359: Add missed "goto error" after setting an exception. (GH-3712) (#3714) (cherry picked from commit d6238a76c655e0feb13478505220dc9049f1682f) --- diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c index 588c697769..4638b47597 100644 --- a/Modules/_io/textio.c +++ b/Modules/_io/textio.c @@ -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 */