Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Swap out the failed tstate.
  • Loading branch information
ericsnowcurrently committed Mar 13, 2023
commit 099e80a9dfe83b2f9e8eeacdf34bbfde8e9eef05
2 changes: 1 addition & 1 deletion Python/pylifecycle.c
Original file line number Diff line number Diff line change
Expand Up @@ -2056,10 +2056,10 @@ new_interpreter(PyThreadState **tstate_p, const _PyInterpreterConfig *config)

/* 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;
}
Expand Down