]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
fFx refleak in isinstance error path (GH-31005)
authorKen Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Sat, 29 Jan 2022 14:34:12 +0000 (22:34 +0800)
committerGitHub <noreply@github.com>
Sat, 29 Jan 2022 14:34:12 +0000 (14:34 +0000)
Python/ceval.c

index fa14a1c04f1e0c8b613bd50c3d4a1d11cd9ba54f..b69d5aa9d32069f51292250d720bed4cd745b73a 100644 (file)
@@ -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);