Fix memory leak in io.StringIO

This commit is contained in:
Antoine Pitrou 2011-11-12 22:34:28 +01:00
parent 39aba4f563
commit c1b0bfdb04
1 changed files with 1 additions and 0 deletions

View File

@ -455,6 +455,7 @@ _PyIncrementalNewlineDecoder_decode(PyObject *_self,
}
Py_DECREF(output);
output = PyUnicode_FromKindAndData(kind, translated, out);
PyMem_Free(translated);
if (!output)
goto error;
}