From: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Date: Thu, 23 May 2024 09:21:53 +0000 (-0400) Subject: gh-119431: fix refleak in test_monitoring (#119444) X-Git-Tag: v3.14.0a1~1791 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c85e3526736d1cf8226686fdf4f5117e105a7b13;p=thirdparty%2FPython%2Fcpython.git gh-119431: fix refleak in test_monitoring (#119444) --- diff --git a/Python/instrumentation.c b/Python/instrumentation.c index 3d78214738e6..9095fb981b79 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); }