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:
Kumar Aditya 2022-01-27 18:33:47 +05:30 committed by GitHub
parent ecfacc362d
commit c7f810b34d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 39 additions and 0 deletions

View file

@ -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;
}