[Python-checkins] cpython (2.7): Issue #15741: Fix potential NULL dereference. Found by Coverity.

stefan.krah python-checkins at python.org
Mon Aug 20 17:36:54 CEST 2012


http://hg.python.org/cpython/rev/2b4f6770877e
changeset:   78676:2b4f6770877e
branch:      2.7
parent:      78660:c793d62cdecc
user:        Stefan Krah <skrah at bytereef.org>
date:        Mon Aug 20 17:31:22 2012 +0200
summary:
  Issue #15741: Fix potential NULL dereference. Found by Coverity.

files:
  Python/bltinmodule.c |  2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)


diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -523,6 +523,8 @@
             mod_ty mod;
 
             arena = PyArena_New();
+            if (arena == NULL)
+                return NULL;
             mod = PyAST_obj2mod(cmd, arena, mode);
             if (mod == NULL) {
                 PyArena_Free(arena);

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list