]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
closes bpo-34493: Objects/genobject.c: Add missing NULL check to compute_cr_origin...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 25 Aug 2018 07:36:34 +0000 (03:36 -0400)
committerGitHub <noreply@github.com>
Sat, 25 Aug 2018 07:36:34 +0000 (03:36 -0400)
(cherry picked from commit 8fdd331bbf7e60dd81c02c7077f44c7939e2a05d)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
Objects/genobject.c

index 88b03c5ef313cab15be35ea104152707e7a30467..e91d11114d3ece031b4d82c25589125e2d045cd4 100644 (file)
@@ -1130,6 +1130,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(