From: Erlend E. Aasland Date: Fri, 20 Jan 2023 11:04:14 +0000 (+0100) Subject: GH-90699: Clear interned strings in `_elementtree` (#101185) X-Git-Tag: v3.12.0a5~150 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9109d460511a317f5598a26658ba495e77ea8686;p=thirdparty%2FPython%2Fcpython.git GH-90699: Clear interned strings in `_elementtree` (#101185) --- diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c index 555c22f88b36..e0ab79103f06 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; }