summaryrefslogtreecommitdiffstats
path: root/Python/sysmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r--Python/sysmodule.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index cbb7397..a4abd7c 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -2290,6 +2290,7 @@ sys_activate_stack_trampoline_impl(PyObject *module, const char *backend)
#ifdef _Py_JIT
_PyOptimizerObject* optimizer = _Py_GetOptimizer();
if (optimizer != NULL) {
+ Py_DECREF(optimizer);
PyErr_SetString(PyExc_ValueError, "Cannot activate the perf trampoline if the JIT is active");
return NULL;
}