From 07795df68345a481fbd72c8cce452666000cbadd Mon Sep 17 00:00:00 2001 From: Stefan Krah Date: Mon, 20 Aug 2012 17:19:50 +0200 Subject: [PATCH] Issue #15741: Fix potential NULL dereference. Found by Coverity. --- Python/bltinmodule.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 0e904909d1d..b85e37bc295 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);