fFx refleak in isinstance error path (GH-31005)

This commit is contained in:
Ken Jin 2022-01-29 22:34:12 +08:00 committed by GitHub
parent 8b1b27f193
commit 8fb3649450
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View 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);