diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-05-17 09:33:42 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-05-17 09:33:42 (GMT) |
commit | ba6b430bd0732ee6ab731b3578d139827d24de80 (patch) | |
tree | e7b5e00b7cb2f60054131e4acadf6a8eeab3d431 | |
parent | e9fb319e688d2d76ab4dbf8b3165ce9d1e24e8fc (diff) | |
download | cpython-ba6b430bd0732ee6ab731b3578d139827d24de80.zip cpython-ba6b430bd0732ee6ab731b3578d139827d24de80.tar.gz cpython-ba6b430bd0732ee6ab731b3578d139827d24de80.tar.bz2 |
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.
-rw-r--r-- | Objects/object.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Objects/object.c b/Objects/object.c index 1f4e3dd..7907a8e 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -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 { |