summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-10-02 13:21:55 (GMT)
committerGitHub <noreply@github.com>2021-10-02 13:21:55 (GMT)
commit22cf6a2f2347b7d4f11e45e557beace55acc79b5 (patch)
treee5832375e750c7ea1237950bc0c311cc706fee0e /Modules
parente040adc806aba32c53f4c3d35899d0e5691cab95 (diff)
downloadcpython-22cf6a2f2347b7d4f11e45e557beace55acc79b5.zip
cpython-22cf6a2f2347b7d4f11e45e557beace55acc79b5.tar.gz
cpython-22cf6a2f2347b7d4f11e45e557beace55acc79b5.tar.bz2
bpo-45329: Fix freed memory access in pyexpat.c (GH-28649)
(cherry picked from commit 0742abdc48886b74ed3b66985a54bb1c32802670) Co-authored-by: TAGAMI Yukihiro <tagami.yukihiro@gmail.com>
Diffstat (limited to 'Modules')
-rw-r--r--Modules/pyexpat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c
index ec68463..b3d9bdd 100644
--- a/Modules/pyexpat.c
+++ b/Modules/pyexpat.c
@@ -1204,10 +1204,10 @@ static void
xmlparse_dealloc(xmlparseobject *self)
{
PyObject_GC_UnTrack(self);
+ (void)xmlparse_clear(self);
if (self->itself != NULL)
XML_ParserFree(self->itself);
self->itself = NULL;
- (void)xmlparse_clear(self);
if (self->handlers != NULL) {
PyMem_Free(self->handlers);