mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
f_code can't be NULL based on Frame_New and other code that derefs it.
So there doesn't seem to be much point to checking here.
This commit is contained in:
parent
8e6675a7dc
commit
7d5b6e8991
1 changed files with 2 additions and 2 deletions
|
|
@ -425,7 +425,7 @@ frame_dealloc(PyFrameObject *f)
|
||||||
Py_CLEAR(f->f_exc_traceback);
|
Py_CLEAR(f->f_exc_traceback);
|
||||||
|
|
||||||
co = f->f_code;
|
co = f->f_code;
|
||||||
if (co != NULL && co->co_zombieframe == NULL)
|
if (co->co_zombieframe == NULL)
|
||||||
co->co_zombieframe = f;
|
co->co_zombieframe = f;
|
||||||
else if (numfree < MAXFREELIST) {
|
else if (numfree < MAXFREELIST) {
|
||||||
++numfree;
|
++numfree;
|
||||||
|
|
@ -435,7 +435,7 @@ frame_dealloc(PyFrameObject *f)
|
||||||
else
|
else
|
||||||
PyObject_GC_Del(f);
|
PyObject_GC_Del(f);
|
||||||
|
|
||||||
Py_XDECREF(co);
|
Py_DECREF(co);
|
||||||
Py_TRASHCAN_SAFE_END(f)
|
Py_TRASHCAN_SAFE_END(f)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue