From: Stefan Krah Date: Mon, 20 Aug 2012 15:31:22 +0000 (+0200) Subject: Issue #15741: Fix potential NULL dereference. Found by Coverity. X-Git-Tag: v2.7.4rc1~622 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a8857af37b483b8d8f6340dfcc0cc5c46afd412a;p=thirdparty%2FPython%2Fcpython.git Issue #15741: Fix potential NULL dereference. Found by Coverity. --- diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index a07b78c8d984..b4f0e24aaf7b 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);