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

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 @@
     else {
         PyErr_SetString(PyExc_OSError,
                         "could not determine default encoding");
+        goto error;
     }
 
     /* Check we have been asked for a real text encoding */