Skip to content
2 changes: 2 additions & 0 deletions Modules/atexitmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ atexit_callfuncs(struct atexit_state *state)
{
PyErr_FormatUnraisable("Exception ignored while "
"copying atexit callbacks");
// gh-140080: need to cleanup
atexit_cleanup(state);
return;
}

Expand Down
Loading