Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c1b0bfd

Browse files
committed
Fix memory leak in io.StringIO
1 parent 39aba4f commit c1b0bfd

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Modules/_io/textio.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,7 @@ _PyIncrementalNewlineDecoder_decode(PyObject *_self,
455455
}
456456
Py_DECREF(output);
457457
output = PyUnicode_FromKindAndData(kind, translated, out);
458+
PyMem_Free(translated);
458459
if (!output)
459460
goto error;
460461
}

0 commit comments

Comments
 (0)