mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
gh-95756: Free and NULL-out code caches when needed (GH-98181)
This commit is contained in:
parent
4067c6d7fe
commit
7ec2e279fe
2 changed files with 3 additions and 0 deletions
|
@ -2238,6 +2238,7 @@ _PyStaticCode_Dealloc(PyCodeObject *co)
|
|||
Py_CLEAR(co->_co_cached->_co_freevars);
|
||||
Py_CLEAR(co->_co_cached->_co_varnames);
|
||||
PyMem_Free(co->_co_cached);
|
||||
co->_co_cached = NULL;
|
||||
}
|
||||
co->co_extra = NULL;
|
||||
if (co->co_weakreflist != NULL) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue