summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorStefan Krah <skrah@bytereef.org>2012-08-20 15:31:22 (GMT)
committerStefan Krah <skrah@bytereef.org>2012-08-20 15:31:22 (GMT)
commita8857af37b483b8d8f6340dfcc0cc5c46afd412a (patch)
treed298295cbaa453caa785cd78dca7366f0da4ddc6 /Python
parentd928b6a96516f611583310fd41c6c905562acd2c (diff)
downloadcpython-a8857af37b483b8d8f6340dfcc0cc5c46afd412a.zip
cpython-a8857af37b483b8d8f6340dfcc0cc5c46afd412a.tar.gz
cpython-a8857af37b483b8d8f6340dfcc0cc5c46afd412a.tar.bz2
Issue #15741: Fix potential NULL dereference. Found by Coverity.
Diffstat (limited to 'Python')
-rw-r--r--Python/bltinmodule.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index a07b78c..b4f0e24 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -523,6 +523,8 @@ builtin_compile(PyObject *self, PyObject *args, PyObject *kwds)
mod_ty mod;
arena = PyArena_New();
+ if (arena == NULL)
+ return NULL;
mod = PyAST_obj2mod(cmd, arena, mode);
if (mod == NULL) {
PyArena_Free(arena);