Kaydet (Commit) c1b0bfdb authored tarafından Antoine Pitrou's avatar Antoine Pitrou

Fix memory leak in io.StringIO

üst 39aba4f5
...@@ -455,6 +455,7 @@ _PyIncrementalNewlineDecoder_decode(PyObject *_self, ...@@ -455,6 +455,7 @@ _PyIncrementalNewlineDecoder_decode(PyObject *_self,
} }
Py_DECREF(output); Py_DECREF(output);
output = PyUnicode_FromKindAndData(kind, translated, out); output = PyUnicode_FromKindAndData(kind, translated, out);
PyMem_Free(translated);
if (!output) if (!output)
goto error; goto error;
} }
......
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