mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Issue #29049: Fix refleak introduced by f5eb0c4f5d37.
This commit is contained in:
parent
fc3723bbf6
commit
6a3cedf8dd
1 changed files with 4 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue