From 8fb36494501aad5b0c1d34311c9743c60bb9926c Mon Sep 17 00:00:00 2001 From: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Date: Sat, 29 Jan 2022 22:34:12 +0800 Subject: [PATCH] fFx refleak in isinstance error path (GH-31005) --- Python/ceval.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Python/ceval.c b/Python/ceval.c index fa14a1c04f1..b69d5aa9d32 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -4946,6 +4946,7 @@ handle_eval_breaker: PyObject *inst = TOP(); int retval = PyObject_IsInstance(inst, cls); if (retval < 0) { + Py_DECREF(cls); goto error; } PyObject *res = PyBool_FromLong(retval);