summaryrefslogtreecommitdiff
path: root/Programs/_bootstrap_python.c
diff options
context:
space:
mode:
authorKumar Aditya <59607654+kumaraditya303@users.noreply.github.com>2022-01-27 18:33:47 +0530
committerGitHub <noreply@github.com>2022-01-27 14:03:47 +0100
commitc7f810b34d91a5c2fbe0a8385562015d2dd961f2 (patch)
tree0fcbd6901e212f47e1054a862af4d8ec571ee7c2 /Programs/_bootstrap_python.c
parentecfacc362dd7fef7715dcd94f2e2ca6c622ef115 (diff)
downloadcpython-git-c7f810b34d91a5c2fbe0a8385562015d2dd961f2.tar.gz
bpo-46476: Fix memory leak in code objects generated by deepfreeze (GH-30853)
Add _Py_Deepfreeze_Fini() and _PyStaticCode_Dealloc() functions.
Diffstat (limited to 'Programs/_bootstrap_python.c')
-rw-r--r--Programs/_bootstrap_python.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/Programs/_bootstrap_python.c b/Programs/_bootstrap_python.c
index f2103fd5aa..f4d0167b62 100644
--- a/Programs/_bootstrap_python.c
+++ b/Programs/_bootstrap_python.c
@@ -14,6 +14,12 @@
#include "Python/frozen_modules/importlib._bootstrap_external.h"
/* End includes */
+/* Empty finalizer for deepfrozen modules*/
+void
+_Py_Deepfreeze_Fini(void)
+{
+}
+
/* Note that a negative size indicates a package. */
static const struct _frozen bootstrap_modules[] = {
@@ -103,3 +109,4 @@ error:
}
Py_ExitStatusException(status);
}
+