[Python-checkins] bpo-37369: Fixes crash when reporting fatal error (GH-14468)

Steve Dower webhook-mailer at python.org
Sat Jun 29 17:28:47 EDT 2019


https://github.com/python/cpython/commit/ac14632c756fec561e4b868b8793334bd7b22241
commit: ac14632c756fec561e4b868b8793334bd7b22241
branch: master
author: Steve Dower <steve.dower at python.org>
committer: GitHub <noreply at github.com>
date: 2019-06-29T14:28:43-07:00
summary:

bpo-37369: Fixes crash when reporting fatal error (GH-14468)

files:
M PC/python_uwp.cpp

diff --git a/PC/python_uwp.cpp b/PC/python_uwp.cpp
index 73e0d82e5503..2352f45e8a3d 100644
--- a/PC/python_uwp.cpp
+++ b/PC/python_uwp.cpp
@@ -166,12 +166,12 @@ wmain(int argc, wchar_t **argv)
     PyPreConfig_InitPythonConfig(&preconfig);
     status = Py_PreInitializeFromArgs(&preconfig, argc, argv);
     if (PyStatus_Exception(status)) {
-        goto fail;
+        goto fail_without_config;
     }
 
     status = PyConfig_InitPythonConfig(&config);
     if (PyStatus_Exception(status)) {
-        goto fail;
+        goto fail_without_config;
     }
 
     status = PyConfig_SetArgv(&config, argc, argv);
@@ -233,6 +233,7 @@ wmain(int argc, wchar_t **argv)
 
 fail:
     PyConfig_Clear(&config);
+fail_without_config:
     if (PyStatus_IsExit(status)) {
         return status.exitcode;
     }



More information about the Python-checkins mailing list