]> granicus.if.org Git - python/commitdiff
bpo-25359: Add missed "goto error" after setting an exception. (#3712)
authorSerhiy Storchaka <storchaka@gmail.com>
Sat, 23 Sep 2017 23:49:58 +0000 (02:49 +0300)
committerGitHub <noreply@github.com>
Sat, 23 Sep 2017 23:49:58 +0000 (02:49 +0300)
Modules/_io/textio.c

index 9b7334d3b54a52941d554a78505959a626078aba..5239e8518e6ae22fa488f020951d94315197c839 100644 (file)
@@ -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 */