From 9109d460511a317f5598a26658ba495e77ea8686 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Fri, 20 Jan 2023 12:04:14 +0100 Subject: GH-90699: Clear interned strings in `_elementtree` (#101185) --- Modules/_elementtree.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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; } -- cgit v0.12