Skip to content

Commit 8f728e5

Browse files
gh-93728: fix memory leak in deepfrozen code objects (GH-93729)
1 parent 3473817 commit 8f728e5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Objects/codeobject.c

+1
Original file line numberDiff line numberDiff line change
@@ -2092,6 +2092,7 @@ _PyStaticCode_Dealloc(PyCodeObject *co)
20922092
deopt_code(_PyCode_CODE(co), Py_SIZE(co));
20932093
co->co_warmup = QUICKENING_INITIAL_WARMUP_VALUE;
20942094
PyMem_Free(co->co_extra);
2095+
Py_CLEAR(co->_co_code);
20952096
co->co_extra = NULL;
20962097
if (co->co_weakreflist != NULL) {
20972098
PyObject_ClearWeakRefs((PyObject *)co);

0 commit comments

Comments
 (0)