We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d1acb86 commit 801c4f1Copy full SHA for 801c4f1
Modules/atexitmodule.c
@@ -152,8 +152,10 @@ atexit_callfuncs(struct atexit_state *state)
152
153
// bpo-46025: Increment the refcount of cb->func as the call itself may unregister it
154
PyObject *func = Py_NewRef(cb->func);
155
+ // No need to hold a strong reference to the arguments though
156
PyObject *args = cb->args;
157
PyObject *kwargs = cb->kwargs;
158
+
159
// Unlock for re-entrancy problems
160
_PyAtExit_UNLOCK(state);
161
PyObject *res = PyObject_Call(func, args, kwargs);
0 commit comments