commit | c1b0bfdb04dfd9d5c69a2a514f85213ae9b81f1b | [log] [tgz] |
---|---|---|
author | Antoine Pitrou <solipsis@pitrou.net> | Sat Nov 12 22:34:28 2011 +0100 |
committer | Antoine Pitrou <solipsis@pitrou.net> | Sat Nov 12 22:34:28 2011 +0100 |
tree | 0ecf17985ff69d11b050254f25fb0fa2dd3145b1 | |
parent | 39aba4f5636f37d93d9fca44968f2846385e27d2 [diff] [blame] |
Fix memory leak in io.StringIO
diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c index e9abaf4..eef99da 100644 --- a/Modules/_io/textio.c +++ b/Modules/_io/textio.c
@@ -455,6 +455,7 @@ } Py_DECREF(output); output = PyUnicode_FromKindAndData(kind, translated, out); + PyMem_Free(translated); if (!output) goto error; }