mirror of
https://github.com/python/cpython.git
synced 2026-01-04 14:32:21 +00:00
bpo-46430: Fix memory leak in interned strings of deep-frozen modules (GH-31549)
This commit is contained in:
parent
042f31da55
commit
4dc746310b
6 changed files with 21 additions and 6 deletions
|
|
@ -754,7 +754,6 @@ pycore_init_types(PyInterpreterState *interp)
|
|||
if (_PyStatus_EXCEPTION(status)) {
|
||||
return status;
|
||||
}
|
||||
|
||||
return _PyStatus_OK();
|
||||
}
|
||||
|
||||
|
|
@ -827,7 +826,10 @@ pycore_interp_init(PyThreadState *tstate)
|
|||
if (_PyStatus_EXCEPTION(status)) {
|
||||
return status;
|
||||
}
|
||||
|
||||
// Intern strings in deep-frozen modules first so that others
|
||||
// can use it instead of creating a heap allocated string.
|
||||
_Py_Deepfreeze_Init();
|
||||
|
||||
status = pycore_init_types(interp);
|
||||
if (_PyStatus_EXCEPTION(status)) {
|
||||
goto done;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue