diff options
author | Erlend E. Aasland <erlend.aasland@protonmail.com> | 2023-01-20 11:04:14 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-20 11:04:14 (GMT) |
commit | 9109d460511a317f5598a26658ba495e77ea8686 (patch) | |
tree | d1a924a192e664378ee4f5039394132b04187fc9 /Modules/_elementtree.c | |
parent | 8cdbc4609022c9c8dfb66da328a149c2bea75f89 (diff) | |
download | cpython-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.c | 10 |
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; } |