Commit 8fdd331b authored by Alexey Izbyshev's avatar Alexey Izbyshev Committed by Benjamin Peterson

closes bpo-34493: Objects/genobject.c: Add missing NULL check to compute_cr_origin() (GH-8911)

parent 416cbce2
...@@ -1128,6 +1128,9 @@ compute_cr_origin(int origin_depth) ...@@ -1128,6 +1128,9 @@ compute_cr_origin(int origin_depth)
/* Now collect them */ /* Now collect them */
PyObject *cr_origin = PyTuple_New(frame_count); PyObject *cr_origin = PyTuple_New(frame_count);
if (cr_origin == NULL) {
return NULL;
}
frame = PyEval_GetFrame(); frame = PyEval_GetFrame();
for (int i = 0; i < frame_count; ++i) { for (int i = 0; i < frame_count; ++i) {
PyObject *frameinfo = Py_BuildValue( PyObject *frameinfo = Py_BuildValue(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment