summaryrefslogtreecommitdiffstats
path: root/Modules/_elementtree.c
diff options
context:
space:
mode:
authorErlend E. Aasland <erlend.aasland@protonmail.com>2023-01-20 11:04:14 (GMT)
committerGitHub <noreply@github.com>2023-01-20 11:04:14 (GMT)
commit9109d460511a317f5598a26658ba495e77ea8686 (patch)
treed1a924a192e664378ee4f5039394132b04187fc9 /Modules/_elementtree.c
parent8cdbc4609022c9c8dfb66da328a149c2bea75f89 (diff)
downloadcpython-9109d460511a317f5598a26658ba495e77ea8686.zip
cpython-9109d460511a317f5598a26658ba495e77ea8686.tar.gz
cpython-9109d460511a317f5598a26658ba495e77ea8686.tar.bz2
GH-90699: Clear interned strings in `_elementtree` (#101185)
Diffstat (limited to 'Modules/_elementtree.c')
-rw-r--r--Modules/_elementtree.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c
index 555c22f..e0ab791 100644
--- a/Modules/_elementtree.c
+++ b/Modules/_elementtree.c
@@ -122,6 +122,16 @@ elementtree_clear(PyObject *m)
Py_CLEAR(st->elementpath_obj);
Py_CLEAR(st->comment_factory);
Py_CLEAR(st->pi_factory);
+
+ // Interned strings
+ Py_CLEAR(st->str_append);
+ Py_CLEAR(st->str_find);
+ Py_CLEAR(st->str_findall);
+ Py_CLEAR(st->str_findtext);
+ Py_CLEAR(st->str_iterfind);
+ Py_CLEAR(st->str_tail);
+ Py_CLEAR(st->str_text);
+ Py_CLEAR(st->str_doctype);
return 0;
}