diff --git a/Python/instrumentation.c b/Python/instrumentation.c index 3d78214738e..9095fb981b7 100644 --- a/Python/instrumentation.c +++ b/Python/instrumentation.c @@ -2724,5 +2724,6 @@ _PyMonitoring_FireStopIterationEvent(PyMonitoringState *state, PyObject *codelik } PyObject *args[4] = { NULL, NULL, NULL, exc }; int err = capi_call_instrumentation(state, codelike, offset, args, 3, event); + Py_DECREF(exc); return exception_event_teardown(err, NULL); }