diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-12-21 10:32:56 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-12-21 10:32:56 (GMT) |
commit | 18f018ca12fccecaefc427927350538d5d37d51e (patch) | |
tree | d65b77f4f8b56451bc9cb857c8b381ca2b234355 /Modules/_elementtree.c | |
parent | fb2ae15c6704a072afeef4786749d9bb2ce7d68d (diff) | |
download | cpython-18f018ca12fccecaefc427927350538d5d37d51e.zip cpython-18f018ca12fccecaefc427927350538d5d37d51e.tar.gz cpython-18f018ca12fccecaefc427927350538d5d37d51e.tar.bz2 |
Issue #28871: Fixed a crash when deallocate deep ElementTree.
Diffstat (limited to 'Modules/_elementtree.c')
-rw-r--r-- | Modules/_elementtree.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c index 1cdddaf..7d50dd0 100644 --- a/Modules/_elementtree.c +++ b/Modules/_elementtree.c @@ -652,6 +652,7 @@ static void element_dealloc(ElementObject* self) { PyObject_GC_UnTrack(self); + Py_TRASHCAN_SAFE_BEGIN(self) if (self->weakreflist != NULL) PyObject_ClearWeakRefs((PyObject *) self); @@ -662,6 +663,7 @@ element_dealloc(ElementObject* self) RELEASE(sizeof(ElementObject), "destroy element"); Py_TYPE(self)->tp_free((PyObject *)self); + Py_TRASHCAN_SAFE_END(self) } /* -------------------------------------------------------------------- */ |