Issue #29049: Fix refleak introduced by f5eb0c4f5d37.
This commit is contained in:
parent
fc3723bbf6
commit
6a3cedf8dd
|
@ -4152,8 +4152,11 @@ _PyEval_EvalCodeWithName(PyObject *_co, PyObject *globals, PyObject *locals,
|
|||
} else {
|
||||
gen = PyGen_NewWithQualName(f, name, qualname);
|
||||
}
|
||||
if (gen == NULL)
|
||||
if (gen == NULL) {
|
||||
Py_DECREF(f);
|
||||
return NULL;
|
||||
}
|
||||
_PyObject_GC_TRACK(f);
|
||||
|
||||
if (is_coro && coro_wrapper != NULL) {
|
||||
PyObject *wrapped;
|
||||
|
|
Loading…
Reference in New Issue