Skip to content

Commit 8fdd331

Browse files
Alexey Izbyshevbenjaminp
authored andcommitted
closes bpo-34493: Objects/genobject.c: Add missing NULL check to compute_cr_origin() (GH-8911)
1 parent 416cbce commit 8fdd331

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Objects/genobject.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,6 +1128,9 @@ compute_cr_origin(int origin_depth)
11281128

11291129
/* Now collect them */
11301130
PyObject *cr_origin = PyTuple_New(frame_count);
1131+
if (cr_origin == NULL) {
1132+
return NULL;
1133+
}
11311134
frame = PyEval_GetFrame();
11321135
for (int i = 0; i < frame_count; ++i) {
11331136
PyObject *frameinfo = Py_BuildValue(

0 commit comments

Comments
 (0)