From 4954b8dc5305de72ce618522522a2910c3a34126 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Wed, 27 Sep 2017 08:44:03 +0300 Subject: [2.7] bpo-25359: Add missed "goto error" after setting an exception. (GH-3712) (#3779) (cherry picked from commit d6238a76c655e0feb13478505220dc9049f1682f) --- Modules/_io/textio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c index d9e036d..bf37f72 100644 --- a/Modules/_io/textio.c +++ b/Modules/_io/textio.c @@ -907,6 +907,7 @@ textiowrapper_init(textio *self, PyObject *args, PyObject *kwds) else { PyErr_SetString(PyExc_IOError, "could not determine default encoding"); + goto error; } /* Check we have been asked for a real text encoding */ -- cgit v0.12