[Python-checkins] [3.6] bpo-25359: Add missed "goto error" after setting an exception. (GH-3712) (#3714)

Serhiy Storchaka webhook-mailer at python.org
Sat Sep 23 20:29:19 EDT 2017


https://github.com/python/cpython/commit/7e32cee1a68a489c4f2e916ac7003004b51887de
commit: 7e32cee1a68a489c4f2e916ac7003004b51887de
branch: 3.6
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: Serhiy Storchaka <storchaka at gmail.com>
date: 2017-09-24T03:29:17+03:00
summary:

[3.6] bpo-25359: Add missed "goto error" after setting an exception. (GH-3712) (#3714)

(cherry picked from commit d6238a76c655e0feb13478505220dc9049f1682f)

files:
M Modules/_io/textio.c

diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c
index 588c6977691..4638b475970 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 */



More information about the Python-checkins mailing list