summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorStefan Krah <skrah@bytereef.org>2012-08-20 15:19:50 (GMT)
committerStefan Krah <skrah@bytereef.org>2012-08-20 15:19:50 (GMT)
commit07795df68345a481fbd72c8cce452666000cbadd (patch)
treea6310a3b05483fe59ea538af7e14e0b96de9f864 /Python
parentdb579d7b25a483601ae9d8eec2846b4839cd97aa (diff)
downloadcpython-07795df68345a481fbd72c8cce452666000cbadd.zip
cpython-07795df68345a481fbd72c8cce452666000cbadd.tar.gz
cpython-07795df68345a481fbd72c8cce452666000cbadd.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 0e90490..b85e37b 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -631,6 +631,8 @@ builtin_compile(PyObject *self, PyObject *args, PyObject *kwds)
mod_ty mod;
arena = PyArena_New();
+ if (arena == NULL)
+ goto error;
mod = PyAST_obj2mod(cmd, arena, mode);
if (mod == NULL) {
PyArena_Free(arena);