Commit ba6b430b authored by Victor Stinner's avatar Victor Stinner

Fix refleak in internal_print() introduced by myself in r81251

_PyUnicode_AsDefaultEncodedString() uses a magical PyUnicode attribute to
automatically destroy PyUnicode_EncodeUTF8() result when the unicode string is
destroyed.
parent e9fb319e
......@@ -311,6 +311,7 @@ internal_print(PyObject *op, FILE *fp, int flags, int nesting)
else {
fwrite(PyBytes_AS_STRING(t), 1,
PyBytes_GET_SIZE(t), fp);
Py_DECREF(t);
}
}
else {
......
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