From b8ff16092642bfebe51e838512a4830990b8e522 Mon Sep 17 00:00:00 2001 From: Irit Katriel Date: Thu, 23 May 2024 00:04:39 +0100 Subject: [PATCH] gh-119431: fix refleak in test_monitoring --- Python/instrumentation.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Python/instrumentation.c b/Python/instrumentation.c index 3d78214738e66b..9095fb981b7981 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); }