This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ezio.melotti
Recipients Arfrever, danielsh, einarfd, eli.bendersky, ezio.melotti, flox, georg.brandl, jcea, larry, python-dev, santoso.wijaya, skrah
Date 2013-01-11.07:37:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1357889852.95.0.387817475438.issue16076@psf.upfronthosting.co.za>
In-reply-to
Content
The fix introduced some refleaks: 
$ ./python -m test -R3:2 test_xml_etree_c
test_xml_etree_c leaked [56, 56] references, sum=112

One seems to be in __getstate__:
diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c
--- a/Modules/_elementtree.c
+++ b/Modules/_elementtree.c
@@ -859,8 +859,10 @@
                                      PICKLED_ATTRIB, self->extra->attrib,
                                      PICKLED_TEXT, self->text,
                                      PICKLED_TAIL, self->tail);
-    if (instancedict)
+    if (instancedict) {
+        Py_DECREF(children);
         return instancedict;
+    }
     else {
         for (i = 0; i < PyList_GET_SIZE(children); i++)
             Py_DECREF(PyList_GET_ITEM(children, i));

I'm still looking for the other.
History
Date User Action Args
2013-01-11 07:37:33ezio.melottisetrecipients: + ezio.melotti, georg.brandl, jcea, larry, Arfrever, eli.bendersky, skrah, flox, santoso.wijaya, python-dev, einarfd, danielsh
2013-01-11 07:37:32ezio.melottisetmessageid: <1357889852.95.0.387817475438.issue16076@psf.upfronthosting.co.za>
2013-01-11 07:37:32ezio.melottilinkissue16076 messages
2013-01-11 07:37:32ezio.melotticreate