summaryrefslogtreecommitdiff
path: root/Modules
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-03-19 15:08:17 +0100
committerGitHub <noreply@github.com>2019-03-19 15:08:17 +0100
commit935250d6f3ac7ba91e1ea8e6ca63aaf7f605e291 (patch)
treedaced736625b7c18810fadbc348024b5b12fe28e /Modules
parent09e5877cb1191fe09af7a2139780d377bdf19092 (diff)
downloadcpython-git-935250d6f3ac7ba91e1ea8e6ca63aaf7f605e291.tar.gz
bpo-36356: pymain_free() calls _PyRuntime_Finalize() (GH-12436)
Ensure that _PyRuntime_Finalize() is always call. This change fix a few memory leaks when running "python3 -V".
Diffstat (limited to 'Modules')
-rw-r--r--Modules/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/main.c b/Modules/main.c
index a745381109..f94689496a 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -660,6 +660,8 @@ pymain_free_raw(_PyMain *pymain)
orig_argc = 0;
orig_argv = NULL;
+ _PyRuntime_Finalize();
+
PyMem_SetAllocator(PYMEM_DOMAIN_RAW, &old_alloc);
}