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 eeaf20b..b0c5da5 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -1962,10 +1962,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;
}