summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Python/pylifecycle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index 4060c23..9248e97 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -2028,10 +2028,10 @@ error:
/* Oops, it didn't work. Undo it all. */
PyErr_PrintEx(0);
+ PyThreadState_Swap(save_tstate);
PyThreadState_Clear(tstate);
PyThreadState_Delete(tstate);
PyInterpreterState_Delete(interp);
- PyThreadState_Swap(save_tstate);
return status;
}