diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-10-02 13:21:55 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-02 13:21:55 (GMT) |
commit | 22cf6a2f2347b7d4f11e45e557beace55acc79b5 (patch) | |
tree | e5832375e750c7ea1237950bc0c311cc706fee0e /Modules | |
parent | e040adc806aba32c53f4c3d35899d0e5691cab95 (diff) | |
download | cpython-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.c | 2 |
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); |