mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
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.
This commit is contained in:
parent
e9fb319e68
commit
ba6b430bd0
1 changed files with 1 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue