summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
authorKen Jin <28750310+Fidget-Spinner@users.noreply.github.com>2022-01-29 14:34:12 (GMT)
committerGitHub <noreply@github.com>2022-01-29 14:34:12 (GMT)
commit8fb36494501aad5b0c1d34311c9743c60bb9926c (patch)
treefba8270cb68547bb4524c516a2beb4626d28eda7 /Python/ceval.c
parent8b1b27f1939cc4060531d198fdb09242f247ca7c (diff)
downloadcpython-8fb36494501aad5b0c1d34311c9743c60bb9926c.zip
cpython-8fb36494501aad5b0c1d34311c9743c60bb9926c.tar.gz
cpython-8fb36494501aad5b0c1d34311c9743c60bb9926c.tar.bz2
fFx refleak in isinstance error path (GH-31005)
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index fa14a1c..b69d5aa 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);