Skip to content

Commit 46af206

Browse files
miss-islingtonAlexey Izbyshev
andauthored
closes bpo-34493: Objects/genobject.c: Add missing NULL check to compute_cr_origin() (GH-8911)
(cherry picked from commit 8fdd331) Co-authored-by: Alexey Izbyshev <[email protected]>
1 parent d5f017b commit 46af206

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
@@ -1130,6 +1130,9 @@ compute_cr_origin(int origin_depth)
11301130

11311131
/* Now collect them */
11321132
PyObject *cr_origin = PyTuple_New(frame_count);
1133+
if (cr_origin == NULL) {
1134+
return NULL;
1135+
}
11331136
frame = PyEval_GetFrame();
11341137
for (int i = 0; i < frame_count; ++i) {
11351138
PyObject *frameinfo = Py_BuildValue(

0 commit comments

Comments
 (0)