summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-12-18 20:29:14 (GMT)
committerGitHub <noreply@github.com>2018-12-18 20:29:14 (GMT)
commitd2a75c67830d7c9f59e4e9b60f36974234c829ef (patch)
tree4e6f90c9c9904f52c089610f21b4151a33714716 /Modules
parent60875db2f67815d7d181c552bfac59e8c97619e3 (diff)
downloadcpython-d2a75c67830d7c9f59e4e9b60f36974234c829ef.zip
cpython-d2a75c67830d7c9f59e4e9b60f36974234c829ef.tar.gz
cpython-d2a75c67830d7c9f59e4e9b60f36974234c829ef.tar.bz2
bpo-35502: Fix reference leaks in ElementTree.TreeBuilder. (GH-11170)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_elementtree.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c
index 12e418d..b1a9629 100644
--- a/Modules/_elementtree.c
+++ b/Modules/_elementtree.c
@@ -2447,6 +2447,11 @@ _elementtree_TreeBuilder___init___impl(TreeBuilderObject *self,
static int
treebuilder_gc_traverse(TreeBuilderObject *self, visitproc visit, void *arg)
{
+ Py_VISIT(self->end_ns_event_obj);
+ Py_VISIT(self->start_ns_event_obj);
+ Py_VISIT(self->end_event_obj);
+ Py_VISIT(self->start_event_obj);
+ Py_VISIT(self->events_append);
Py_VISIT(self->root);
Py_VISIT(self->this);
Py_VISIT(self->last);