diff Objects/object.c @ 61655:31cee2cf7c37

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.
author Victor Stinner <victor.stinner@haypocalc.com>
date Mon, 17 May 2010 09:33:42 +0000
parents 556961f4f16d
children 356a6fc9e578
line wrap: on
line diff
--- a/Objects/object.c	Mon May 17 08:58:51 2010 +0000
+++ b/Objects/object.c	Mon May 17 09:33:42 2010 +0000
@@ -311,6 +311,7 @@
                 else {
                     fwrite(PyBytes_AS_STRING(t), 1,
                            PyBytes_GET_SIZE(t), fp);
+                    Py_DECREF(t);
                 }
             }
             else {