mirror of https://github.com/python/cpython
closes bpo-34493: Objects/genobject.c: Add missing NULL check to compute_cr_origin() (GH-8911)
This commit is contained in:
parent
416cbce22d
commit
8fdd331bbf
|
@ -1128,6 +1128,9 @@ compute_cr_origin(int origin_depth)
|
|||
|
||||
/* Now collect them */
|
||||
PyObject *cr_origin = PyTuple_New(frame_count);
|
||||
if (cr_origin == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
frame = PyEval_GetFrame();
|
||||
for (int i = 0; i < frame_count; ++i) {
|
||||
PyObject *frameinfo = Py_BuildValue(
|
||||
|
|
Loading…
Reference in New Issue