Skip to content

Commit 9109d46

Browse files
GH-90699: Clear interned strings in _elementtree (#101185)
1 parent 8cdbc46 commit 9109d46

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Modules/_elementtree.c

+10
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,16 @@ elementtree_clear(PyObject *m)
122122
Py_CLEAR(st->elementpath_obj);
123123
Py_CLEAR(st->comment_factory);
124124
Py_CLEAR(st->pi_factory);
125+
126+
// Interned strings
127+
Py_CLEAR(st->str_append);
128+
Py_CLEAR(st->str_find);
129+
Py_CLEAR(st->str_findall);
130+
Py_CLEAR(st->str_findtext);
131+
Py_CLEAR(st->str_iterfind);
132+
Py_CLEAR(st->str_tail);
133+
Py_CLEAR(st->str_text);
134+
Py_CLEAR(st->str_doctype);
125135
return 0;
126136
}
127137

0 commit comments

Comments
 (0)