From c85e3526736d1cf8226686fdf4f5117e105a7b13 Mon Sep 17 00:00:00 2001 From: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Date: Thu, 23 May 2024 05:21:53 -0400 Subject: gh-119431: fix refleak in test_monitoring (#119444) --- Python/instrumentation.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Python/instrumentation.c b/Python/instrumentation.c index 3d78214..9095fb9 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); } -- cgit v0.12