Skip to content

Commit

Permalink
gh-93728: fix memory leak in deepfrozen code objects (GH-93729)
Browse files Browse the repository at this point in the history
  • Loading branch information
kumaraditya303 committed Jun 12, 2022
1 parent 3473817 commit 8f728e5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Objects/codeobject.c
Expand Up @@ -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);
Expand Down

0 comments on commit 8f728e5

Please sign in to comment.