summaryrefslogtreecommitdiffstats
path: root/Modules/_io
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-09-23 23:49:58 (GMT)
committerGitHub <noreply@github.com>2017-09-23 23:49:58 (GMT)
commitd6238a76c655e0feb13478505220dc9049f1682f (patch)
tree009a07cd82ba5e226e801e65f8a96b827ea2aec4 /Modules/_io
parentcd99e79dc74c9d9dea83a5551d657c334b2cc6c9 (diff)
downloadcpython-d6238a76c655e0feb13478505220dc9049f1682f.zip
cpython-d6238a76c655e0feb13478505220dc9049f1682f.tar.gz
cpython-d6238a76c655e0feb13478505220dc9049f1682f.tar.bz2
bpo-25359: Add missed "goto error" after setting an exception. (#3712)
Diffstat (limited to 'Modules/_io')
-rw-r--r--Modules/_io/textio.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c
index 9b7334d..5239e85 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 */