summaryrefslogtreecommitdiff
path: root/Include
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 /Include
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 'Include')
-rw-r--r--Include/internal/pystate.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Include/internal/pystate.h b/Include/internal/pystate.h
index 721d34fa4c..5891339b54 100644
--- a/Include/internal/pystate.h
+++ b/Include/internal/pystate.h
@@ -118,6 +118,9 @@ PyAPI_FUNC(void) _PyRuntimeState_Fini(_PyRuntimeState *);
Return NULL on success, or return an error message on failure. */
PyAPI_FUNC(_PyInitError) _PyRuntime_Initialize(void);
+PyAPI_FUNC(void) _PyRuntime_Finalize(void);
+
+
#define _Py_CURRENTLY_FINALIZING(tstate) \
(_PyRuntime.finalizing == tstate)