summaryrefslogtreecommitdiff
path: root/Objects
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-08-25 03:36:34 -0400
committerGitHub <noreply@github.com>2018-08-25 03:36:34 -0400
commit46af206ea4e9d67375559f8c584a996f70b7b7e5 (patch)
tree2b6aa41fd7dc05cfe0d19ebc5d6cb261c8e8f2e1 /Objects
parentd5f017bbd65f37ac53fd3c6c439a53155eef2475 (diff)
downloadcpython-git-46af206ea4e9d67375559f8c584a996f70b7b7e5.tar.gz
closes bpo-34493: Objects/genobject.c: Add missing NULL check to compute_cr_origin() (GH-8911)
(cherry picked from commit 8fdd331bbf7e60dd81c02c7077f44c7939e2a05d) Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
Diffstat (limited to 'Objects')
-rw-r--r--Objects/genobject.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Objects/genobject.c b/Objects/genobject.c
index 88b03c5ef3..e91d11114d 100644
--- a/Objects/genobject.c
+++ b/Objects/genobject.c
@@ -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(