mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +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
|
|
@ -651,6 +651,8 @@ add_load_fast_null_checks(PyCodeObject *co)
|
|||
Py_CLEAR(co->_co_cached->_co_cellvars);
|
||||
Py_CLEAR(co->_co_cached->_co_freevars);
|
||||
Py_CLEAR(co->_co_cached->_co_varnames);
|
||||
PyMem_Free(co->_co_cached);
|
||||
co->_co_cached = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue