Commit 41af942e authored by Stéphane Wirtel's avatar Stéphane Wirtel Committed by Victor Stinner

bpo-30615: Fix the leak reference in Modules/_elementtree.c (#2129)

parent 0cc43df0
......@@ -1266,8 +1266,10 @@ element_repr(ElementObject* self)
if (status == 0) {
PyObject *repr, *tag;
tag = PyObject_Repr(self->tag);
if (!tag)
if (!tag) {
Py_ReprLeave((PyObject *)self);
return NULL;
}
repr = PyString_FromFormat("<Element %s at %p>",
PyString_AS_STRING(tag), self);
......
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