mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-46476: Fix memory leak in code objects generated by deepfreeze (GH-30853)
Add _Py_Deepfreeze_Fini() and _PyStaticCode_Dealloc() functions.
This commit is contained in:
parent
ecfacc362d
commit
c7f810b34d
8 changed files with 39 additions and 0 deletions
|
@ -22,6 +22,12 @@
|
|||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
/* Empty finalizer for deepfrozen modules */
|
||||
void
|
||||
_Py_Deepfreeze_Fini(void)
|
||||
{
|
||||
}
|
||||
|
||||
/* To avoid a circular dependency on frozen.o, we create our own structure
|
||||
of frozen modules instead, left deliberately blank so as to avoid
|
||||
unintentional import of a stale version of _frozen_importlib. */
|
||||
|
@ -235,3 +241,4 @@ error:
|
|||
Py_Finalize();
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue