summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Misc/NEWS2
-rw-r--r--Modules/_io/textio.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index b4a0091..29bf33a 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -19,6 +19,8 @@ Core and Builtins
Library
-------
+- Don't Py_DECREF NULL variable in io.IncrementalNewlineDecoder.
+
- Issue #8515: Set __file__ when run file in IDLE.
Initial patch by Bruce Frederiksen.
diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c
index 833a527..ae105e5 100644
--- a/Modules/_io/textio.c
+++ b/Modules/_io/textio.c
@@ -460,7 +460,7 @@ _PyIncrementalNewlineDecoder_decode(PyObject *_self,
output = PyUnicode_FromKindAndData(kind, translated, out);
PyMem_Free(translated);
if (!output)
- goto error;
+ return NULL;
}
self->seennl |= seennl;
}