diff options
author | Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> | 2022-06-12 14:42:18 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-12 14:42:18 (GMT) |
commit | 8f728e5baa7a673b83607aaccbd496d77d334ded (patch) | |
tree | 1e8b0e77c5a991155273b4056bf30e75e9594bf9 /Objects | |
parent | 3473817106c23eca7341c931453da0341c367e1d (diff) | |
download | cpython-8f728e5baa7a673b83607aaccbd496d77d334ded.zip cpython-8f728e5baa7a673b83607aaccbd496d77d334ded.tar.gz cpython-8f728e5baa7a673b83607aaccbd496d77d334ded.tar.bz2 |
gh-93728: fix memory leak in deepfrozen code objects (GH-93729)
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/codeobject.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Objects/codeobject.c b/Objects/codeobject.c index dc6dec1..2a2f132 100644 --- a/Objects/codeobject.c +++ b/Objects/codeobject.c @@ -2092,6 +2092,7 @@ _PyStaticCode_Dealloc(PyCodeObject *co) deopt_code(_PyCode_CODE(co), Py_SIZE(co)); co->co_warmup = QUICKENING_INITIAL_WARMUP_VALUE; PyMem_Free(co->co_extra); + Py_CLEAR(co->_co_code); co->co_extra = NULL; if (co->co_weakreflist != NULL) { PyObject_ClearWeakRefs((PyObject *)co); |