diff options
author | 2018-08-25 10:15:23 +0300 | |
---|---|---|
committer | 2018-08-25 00:15:23 -0700 | |
commit | 8fdd331bbf7e60dd81c02c7077f44c7939e2a05d (patch) | |
tree | e6d1775cb7df293441a0028e3c6e1aef05fc3323 /Objects/genobject.c | |
parent | Fixed typo with asynccontextmanager code example (GH-8845) (diff) | |
download | cpython-8fdd331bbf7e60dd81c02c7077f44c7939e2a05d.tar.gz cpython-8fdd331bbf7e60dd81c02c7077f44c7939e2a05d.tar.bz2 cpython-8fdd331bbf7e60dd81c02c7077f44c7939e2a05d.zip |
closes bpo-34493: Objects/genobject.c: Add missing NULL check to compute_cr_origin() (GH-8911)
Diffstat (limited to 'Objects/genobject.c')
-rw-r--r-- | Objects/genobject.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Objects/genobject.c b/Objects/genobject.c index e55cfd21c69..453b1003300 100644 --- a/Objects/genobject.c +++ b/Objects/genobject.c @@ -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( |