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

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


https://github.com/python/cpython/commit/d6238a76c655e0feb13478505220dc9049f1682f
commit: d6238a76c655e0feb13478505220dc9049f1682f
branch: master
author: Serhiy Storchaka <storchaka at gmail.com>
committer: GitHub <noreply at github.com>
date: 2017-09-24T02:49:58+03:00
summary:

bpo-25359: Add missed "goto error" after setting an exception. (#3712)

files:
M Modules/_io/textio.c

diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c
index 9b7334d3b54..5239e8518e6 100644
--- a/Modules/_io/textio.c
+++ b/Modules/_io/textio.c
@@ -941,6 +941,7 @@ _io_TextIOWrapper___init___impl(textio *self, PyObject *buffer,
     else {
         PyErr_SetString(PyExc_OSError,
                         "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