Commit 0f9eec19 authored by Ross Lagerwall's avatar Ross Lagerwall

Don't Py_DECREF NULL variable in io.IncrementalNewlineDecoder.

Found with Clang's Static Analyzer.
parent c1b34a36
...@@ -19,6 +19,8 @@ Core and Builtins ...@@ -19,6 +19,8 @@ Core and Builtins
Library Library
------- -------
- Don't Py_DECREF NULL variable in io.IncrementalNewlineDecoder.
- Issue #8515: Set __file__ when run file in IDLE. - Issue #8515: Set __file__ when run file in IDLE.
Initial patch by Bruce Frederiksen. Initial patch by Bruce Frederiksen.
......
...@@ -460,7 +460,7 @@ _PyIncrementalNewlineDecoder_decode(PyObject *_self, ...@@ -460,7 +460,7 @@ _PyIncrementalNewlineDecoder_decode(PyObject *_self,
output = PyUnicode_FromKindAndData(kind, translated, out); output = PyUnicode_FromKindAndData(kind, translated, out);
PyMem_Free(translated); PyMem_Free(translated);
if (!output) if (!output)
goto error; return NULL;
} }
self->seennl |= seennl; self->seennl |= seennl;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment