summaryrefslogtreecommitdiffstats
path: root/Python/pylifecycle.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-12-11 07:27:50 (GMT)
committerGitHub <noreply@github.com>2018-12-11 07:27:50 (GMT)
commit8855d9339858683c9b4fcd50b02a7bca526d4726 (patch)
tree3c85fc696f92556807f1031f9653ed3b73d70561 /Python/pylifecycle.c
parent37607f26697351751165a042f91f04530ce333f7 (diff)
downloadcpython-8855d9339858683c9b4fcd50b02a7bca526d4726.zip
cpython-8855d9339858683c9b4fcd50b02a7bca526d4726.tar.gz
cpython-8855d9339858683c9b4fcd50b02a7bca526d4726.tar.bz2
[3.6] bpo-35454: Fix miscellaneous minor issues in error handling. (GH-11077) (GH-11106)
(cherry picked from commit 8905fcc85a6fc3ac394bc89b0bbf40897e9497a6)
Diffstat (limited to 'Python/pylifecycle.c')
-rw-r--r--Python/pylifecycle.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index 56f04af..0ebf9c7 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -797,6 +797,9 @@ Py_NewInterpreter(void)
goto handle_error;
Py_INCREF(interp->builtins);
}
+ else if (PyErr_Occurred()) {
+ goto handle_error;
+ }
/* initialize builtin exceptions */
_PyExc_Init(bimod);